Skip to content

Generate assistant completion after tool execution #6508

Closed
@finom

Description

@finom

Description

streamText({
      model: openai('gpt-4o'),
      system: 'You are a helpful assistant. Always provide a clear confirmation message after executing any function. Explain what was done and what the results were.',
      messages,
      tools,
    }).toDataStreamResponse();

When tools are executed with success (finishReason: 'tool-calls), the framework doesn't respond back to the user with "successfully did the thing". Is there an option that allows to make it generate a success message after tools are run? Maybe I can inject a system message after the tool calls?

AI SDK Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions