Skip to content

Using tools / functions with this helper #20

@gaborvar

Description

@gaborvar

Works great when the model communicates only with the well known "assistant" and "user" messages. However, when "tool"-related messages are also sent, two parameters are omitted which causes an error a few lines later.

message_builder.insert_message(message["role"], message["content"], index=append_index) # type: ignore[arg-type]

The code handles the same task correctly when passing few-shot examples. It lends an easy fix for workload messages. The same two parameters tool_calls and tool_call_id are picked up there as expected by other parts of the flow.
I use the OpenAI sample app from https://github.com/Azure-Samples/azure-search-openai-demo which relies on this lib.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions