mirror of
https://github.com/mudler/LocalAI.git
synced 2026-11-06 12:33:16 -05:00
A new opt-in tool group, Past chats (history), gives a chat two read-only tools. search_chats finds messages in the earlier chats of the person (query, scope this_chat, this_agent or all, limit, since) and read_chat reads one chat from a message number. A call returns at most 10 hits with 300 character snippets, or 20 messages and about 6 KiB. Every result is wrapped as untrusted text, a closing line in an old message cannot end the wrapper, and the tool says plainly when nothing is found. What the tools never reach: another user's chats, private chats (a chat with the notes of memory switched off), sub-agent runs, and every chat that no person started, which leaves out the messaging chats that hold the words of other senders. A saved agent needs the new grant history.read, which is off by default and turns the group on when it is saved. An agent that works in a folder may search only its own chats. A run that starts by itself, a messaging chat and a sub-agent do not get the tools. The grant, the switch and the agent are checked again at each call. Each call writes one log line with the tool, user, chat, scope, a hash of the query and the chats returned, and never a query or a message. The Tools menu and the agent form show the group and the grant through the existing lists. The docs and the API notes describe both. Assisted-by: Claude:claude-sonnet-5-5