Archived entries from file /Users/ovistoica/workspace/voice-fn/TODO.org
Usecase: We have an initial prompt and tools to use. We want to change it based on the custom parameters that are inputted throught the twilio websocket. Example: On the twilio websocket, we can give custom parameters like script-name, overrides like user name, etc.We can use the config-change frame to do this. And every processor takes what it cares about from it. However, you add very specific functionality to the twilio-in transport. So, what you need to do is add a custom-params->config argument.
:transport-in {:proc transport/twilio-transport-in
:args {:transport/in-ch in
:twilio/handle-event (fn [event]
{:out {:llm/context ".."
:llm/registered-tools [...]}})}
(defframe my-cool-frame
"This is a cool frame"
{:type :frame.cool/hello
:schema [:map
[:messages LLMContextMessages]
[:tools LLMTools]]})
:functions [{:type :function
:function
{:name "record_party_size"
:handler (fn [{:keys [size]}] ...)
:description "Record the number of people in the party"
:parameters
{:type :object
:properties
{:size {:type :integer
:minimum 1
:maximum 12}}
:required [:size]}
:transition-to :get-time}}]
After this, basically we can just emit a frame/llm-context
and that will update the current context. However the scenario manager needs to