Toolnexus.Client.ConversationStore behaviour (toolnexus v0.9.4)

Copy Markdown View Source

Where ask/4 conversations are remembered — two callbacks (SPEC §8 Conversation memory).

A store is any struct whose module implements this behaviour; the client dispatches on the struct's module. Implement it for a file/db/redis provider to persist across processes.

Summary

Callbacks

get(store, id)

@callback get(store :: struct(), id :: String.t()) :: [map()] | nil

save(store, id, messages)

@callback save(store :: struct(), id :: String.t(), messages :: [map()]) :: any()