Repository navigation
Replies: 1 comment 3 replies
I don't understand what you mean here.
This is not quite correct. gptel leaves this up to the tool by default.
Yes, this may be a better default. The current defaults were set a long time ago in LLM time. There are tools whose output should not appear in the context, such as control flow tools, but these are the exceptions.
Why is it the wrong thing? Different APIs have different recommendations about what to do with the reasoning.
It might be a good idea to change the default to |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I've been digging into how gptel formats LLM inputs and comparing it with what various models/APIs expect. My general take-away is completion-style "chats" should generally be append-only unless you're explicitly trying to shrink the context.
Tool inputs/outputs should be preserved in the conversation history. Unfortunately, gptel currently discards all but the final assistant message after all tool-use rounds complete, unless
gptel-include-tool-resultsis set tot(not the default). I've run into issues in multi-turn conversations where the LLM gets confused and thinks it hallucinated something because it doesn't have the expected tool calls from previous rounds in its context.Thinking/reasoning blocks should generally be kept in the conversation (allowing the API, jinja template, etc. to discard unnecessary reasoning blocks). gptel does the right thing for multi-round tool use, but otherwise:
My concrete recommendations are:
gptel-include-reasoning, maketmean the same thing asignorefor now. Ideally,twould cause reasoning to be sent back to the API server in the appropriate field, but that's a more complicated fix.:include nil.All reactions