Skip to main content

apply_client_tool_answer

Function apply_client_tool_answer 

Source
async fn apply_client_tool_answer(
    conn: &mut PgConnection,
    app_config: &ApplicationConfiguration,
    tool_call: &ChatbotConversationMessageToolCall,
    answer: &ClientToolAnswer,
    user_context: &ChatbotTurnContext,
) -> ChatbotResult<AnsweredClientToolCall>
Expand description

The tool output a client’s answer to tool_call amounts to.

The call is authorized again here rather than trusted from the moment it was offered: nothing bounds how long a call waits, so a role or the configuration can change while it does. A call the caller may no longer make is aborted with an explanation for the model instead of having its answer applied, because the turn stays stuck until its call has some output.