We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dart
Future<void> createImageMessage(String message) async { print(message); await _client.createThreadMessage( threadId: _threadId, request: CreateMessageRequest( role: MessageRole.user, content: CreateMessageRequestContent.parts([ MessageContent.text( text: MessageContentText( value: message, ), ), const MessageContent.imageUrl( imageUrl: MessageContentImageUrl( url: 'https://example.com/image.jpg', // or base64-encoded image ), ), ]), ), ); final stream = _client.createThreadRunStream( threadId: _threadId, request: CreateRunRequest( assistantId: _assistantId, ), ); stream.listen(runListener); } [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: OpenAIClientException({ "uri": "https://api.openai.com/v1/threads/thread_*******/messages", "method": "POST", "code": 400, "message": "Unsuccessful response", "body": { "error": { "message": "Invalid type for 'content[0].text': expected a string, but got an object instead.", "type": "invalid_request_error", "param": "content[0].text", "code": "invalid_type" } } })
Create ThreadRunStream
The text was updated successfully, but these errors were encountered:
davidmigloz
No branches or pull requests
System Info
Dart
Related Components
Reproduction
Expected behavior
Create ThreadRunStream
The text was updated successfully, but these errors were encountered: