Repository navigation
Local models: keep handovers, search first, clean handoff lines - #547
Merged
Merged
Conversation
On an OpenAI-compatible server, agno sent the system prompt with the "developer" role. Ollama ignores that role, so a local model never saw the agent's instructions: no json-tool rule, no handover rules, no guardrail. Send it as "system", which every OpenAI-shaped server accepts. When a json-tool model still ends its turn in plain text, ask once more, in a short run with only one tool, for the turn's transfer and end-chat fields. The reply text stays what the model wrote. The re-ask tool is not named `json`: Ollama 0.40 drops about half of qwen2.5's calls to a tool of that name. A reason outside its enum no longer throws away the transfer flag with it. Signed-off-by: Runix <admin@chattermate.chat>
The subtitle said agents already run on ChatterMate AI, which only hosted editions have. Self-hosted installs now get a neutral line, and a hosted org on its own model is no longer told it runs on ChatterMate AI. Signed-off-by: Runix <admin@chattermate.chat>
- json-tool path: a search-first rule after the output rule. With the
system prompt now reaching Ollama, qwen2.5:7b searched 1 time in 18 and
answered hours and prices from memory; with the rule, 12 in 12.
- Re-ask: a transfer_reason with no transfer_to_human counts as a
transfer, a reply that is only field names ("transfer_to_human:") is
never shown, and the re-ask gets only what's left of AGENT_RUN_TIMEOUT
and is skipped when it has nothing to record.
- Transfer agent: markdown off and a chat-message style rule. Local
models wrapped every handoff line in a ```markdown fence and wrote it
as a letter; a whole-reply prose fence is also stripped.
- Ticket investigator: a prose reply no longer parses its last character
(find("{") == -1); shares first_json_object with the FAQ generator.
- Ticket worker: the startup orphan reap retries while the schema isn't
migrated yet, before the run loop starts.
Signed-off-by: Runix <admin@chattermate.chat>
Signed-off-by: Runix <admin@chattermate.chat>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes found running 1.0.34 with Ollama (qwen2.5:7b,
JSON_TOOL_OUTPUT_PROVIDERS=OPENAI_COMPATIBLE).Handover
system. agno sent it asdeveloper, which Ollama ignores, so the model never saw the agent's instructions.AGENT_RUN_TIMEOUT, is skipped when it has nothing to record, and atransfer_reasonwith no flag counts as a transfer.transfer_to_human:) is never shown to the visitor.Answers
Other
find("{") == -1).Checked on a real install with Ollama: 6 of 6 "let me talk to a person" chats reached the inbox as TRANSFERRED (0 of 3 on 1.0.34); 4 of 6 factual questions answered correctly from the knowledge base (1 of 6 before the search rule). OSS backend suite: 6581 passed.