This commit is contained in:
Alvin-Zilverstand committed 2026-11-13 10:05:28 +01:00
1 parent ed76261303
commit 918bc45ee0
4 files changed
+20 -5

No files matched your search

+2 -2
View File
@@ -16,9 +16,9 @@
For each reply, `history_for()` presents the current speaker's earlier replies as `assistant` messages and the other speaker's replies as `user` messages. It keeps the original topic and recent messages within a 12,000-character request-history budget. The full conversation remains in the UI and exports.
Requests go to `{base_url}/chat/completions` with the speaker's system prompt, model ID, temperature `0.7`, and `max_tokens` of `2000`. Streaming reads server-sent `data:` events and requests usage reporting. If a stream fails or is empty, the app attempts a regular JSON completion. Transport and empty-response failures receive up to two retries. The same message bubble is reused during fallback, replacing partial stream content with the final reply.
Requests go to `{base_url}/chat/completions` with the speaker's system prompt, model ID, temperature `0.7`, and `max_tokens` of `2000`. Streaming reads server-sent `data:` events, requests usage reporting, and requires a final `[DONE]` event. If a stream fails, is incomplete, or is empty, the app attempts a regular JSON completion. Transport and empty-response failures receive up to two retries. The same message bubble is reused during fallback; partial stream content is cleared before the fallback request and cannot enter later conversation history.
`settings.py` writes JSON through a temporary file and atomic replace. Use an `env:VARIABLE` API-key reference for hosted-provider secrets. `.env`, `sloppy.json`, screenshots, and transcripts are ignored by Git.
`settings.py` validates the shape and field types of loaded settings. It writes JSON through an exclusively created temporary file and atomic replace, and removes its own temporary file if the write fails. On Unix, newly written settings are private to the current user (`0600`). Use an `env:VARIABLE` API-key reference for hosted-provider secrets. `.env`, `sloppy.json`, screenshots, and transcripts are ignored by Git.
## Tests