Skip to content

De-serialization error using AssistantClient streaming #200

Closed
@castroal

Description

@castroal

Confirm this is not an issue with the underlying OpenAI API

  • This is an issue with the Python library

Confirm this is not an issue with Azure OpenAI

  • This is not an issue with Azure OpenAI

Describe the bug

Using the AssistantClient with file search enabled and streaming gives the error: The requested operation requires an element of type 'String', but the target element has type 'Object'.'

The exception is raised here:

To Reproduce

  1. Create and streaming enumerate a Run using an assistant with file search enabled.

Code snippets

var response = assistantClient.CreateRunStreamingAsync(
    threadId: "thread_id",
    assistantId: "assistant_id",
    options: new RunCreationOptions {},
    cancellationToken: cToken);

await foreach (var update in response.WithCancellation(cToken))
{
     //after a couple of updates, the error "InvalidOperationException The requested operation requires an element of type 'String', but the target element has type 'Object'." is raised.
}

OS

Windows 11

.NET version

net8.0

Library version

2.0.0-beta.10

Metadata

Metadata

Assignees

Labels

bugCategory: Something isn't working and appears to be a defect in the client library.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions