forked from kent/consciousness
New stream_completions() in openai.rs sends prompt as token IDs to the completions endpoint instead of JSON messages to chat/completions. Handles <think> tags in the response (split into Reasoning events) and stops on <|im_end|> token. start_stream_completions() on ApiClient provides the same interface as start_stream() but takes token IDs instead of Messages. The turn loop in Agent::turn() uses completions when the tokenizer is initialized, falling back to the chat API otherwise. This allows gradual migration — consciousness uses completions (Qwen tokenizer), Claude Code hook still uses chat API (Anthropic). Co-Authored-By: Proof of Concept <poc@bcachefs.org> |
||
|---|---|---|
| .. | ||
| agent | ||
| bin | ||
| claude | ||
| cli | ||
| hippocampus | ||
| learn | ||
| mind | ||
| subconscious | ||
| thalamus | ||
| user | ||
| config.rs | ||
| lib.rs | ||
| main.rs | ||
| session.rs | ||
| util.rs | ||