Skip to main content
This guide will help you migrate your code to v2.5.0

Key Changes

  1. Constructor: Assistant() -> Agent()
  2. LLM/Model: llm -> model
  3. Knowledge Base: knowledge_base -> knowledge
  4. RunResponse: Pydantic model for string response
  5. Structured Output: Changes in how structured output is handled

Detailed Migration Steps

1. Update Import Statements

2. Update Arguments

Replace llm with model and model with id.

3. Update Knowledge Base

Replace knowledge_base with knowledge.

4. Output model response as a string

5. Handle structured outputs

Replace output_model with response_model. If you are using OpenAI models, you can set structured_outputs=True to get a structured output.