mirror of
https://github.com/mudler/LocalAI.git
synced 2026-11-07 13:03:20 -05:00
The tool that reads the details of a context file topic was called memory_read. The loader is generic: any component or add-on that declares a context file uses it, and nothing in it knows which one. Rename the tool to context_read so the host does not name a feature of one add-on. Behaviour and limits stay the same. Assisted-by: Claude:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
17 lines
897 B
Go
17 lines
897 B
Go
// Package contextfiles loads small files of the user's home into the prompt of
|
|
// a chat, and reads their details on demand.
|
|
//
|
|
// It is the host side of a generic mechanism. Any component registers a
|
|
// Source: a scope (user, agent or channel), a home-relative path to a short
|
|
// index file and a byte cap. Each turn the Loader reads the index of every
|
|
// source that applies to the chat and returns one block, under a fixed header
|
|
// that tells the model to consult the notes. The details of a topic stay in
|
|
// files next to the index and are read with the context_read tool. Nothing in
|
|
// this package knows which application started the chat: a plain Studio chat,
|
|
// a chat that came from a messaging app and a chat of a saved agent all use
|
|
// the same code.
|
|
//
|
|
// The package only reads. The path that saves a note is a Writer that another
|
|
// part of the host plugs in.
|
|
package contextfiles
|