Assistants API v2 is now generally available

Jessica Liu
Jessica LiuStaffOpenAI StaffApr 17, 2023

The Assistants API v2 is now generally available! This release includes significant improvements based on your feedback.

What's new

  • Streaming support: Real-time token streaming for runs
  • Improved file handling: New vector store objects for better file search
  • Tool choice: Force specific tool usage with tool_choice parameter
  • Token usage tracking: Detailed usage stats on runs

Migration

v1 endpoints will be deprecated on December 18, 2024. Please migrate your applications before then. The migration guide is available in our docs.

assistant = client.beta.assistants.create(
    name="Math Tutor",
    instructions="You are a helpful math tutor.",
    model="gpt-4o",
    tools=[{"type": "file_search"}],
)

We'd love to hear how you're using the new features!

11.3k views54 replies198 likes
3 Replies
Tom Andersson

Streaming support is a game changer. The UX of our chatbot improved dramatically. No more waiting for full responses.

Mike Torres

Is there a migration tool to convert v1 assistants to v2? I have about 20 assistants to migrate.

Jessica Liu

Not an automated tool, but the migration guide covers all the changes step by step. The main difference is how file search works - you'll need to create vector stores. Most other changes are additive.

Log in to reply to this topic.