Skip to content

Commit

Permalink
docs: Fix openai_dart assistants API outdated documentation (#579)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmigloz authored Oct 21, 2024
1 parent c9b8bdf commit 624c412
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/openai_dart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ Build assistants that can call models and use tools to perform tasks.
```dart
final res = await client.createAssistant(
request: CreateAssistantRequest(
model: CreateAssistantRequestModel.string('gpt-4'),
model: AssistantModel.modelId('gpt-4'),
name: 'Math Tutor',
description: 'Help students with math homework',
instructions: 'You are a personal math tutor. Write and run code to answer math questions.',
Expand Down Expand Up @@ -953,7 +953,7 @@ Related guide: [Assistants](https://platform.openai.com/docs/assistants/overview
final res = await client.createThreadMessage(
threadId: threadId,
request: CreateMessageRequest(
role: CreateMessageRequestRole.user,
role: MessageRole.user,
content: CreateMessageRequestContent.text(
'I need to solve the equation `3x + 11 = 14`. Can you help me?',
),
Expand All @@ -967,7 +967,7 @@ If you need to send multi-modal content, you can use the `CreateMessageRequestCo
final res = await client.createThreadMessage(
threadId: threadId,
request: CreateMessageRequest(
role: CreateMessageRequestRole.user,
role: MessageRole.user,
content: CreateMessageRequestContent.parts([
MessageContent.text(
text: MessageContentText(
Expand Down

0 comments on commit 624c412

Please sign in to comment.