Skip to content

Questions about DashscopeLLMClient Streaming ToolCall #1309

@imhansai

Description

@imhansai

When using DashscopeLLMClient to execute StreamingAgentWithTools

Image

An anomaly has occurred:

Caused by: kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 0: Cannot read Json element because of unexpected end of the object '}' at path: $ JSON input: }

After investigation, two potential issues were found in the code:

  1. When the returned id is "", appendArgumentsDelta should be executed.but it is not.
Image Image
  1. When function.arguments is null, the generated JSON has issues.
Image Image

================================================================================
Since DashscopeLLMClient is final, it cannot be inherited.The only option is to write a similar "repeated" client, mimicking DashscopeLLMClient.

I am puzzled, is there an issue with the data format returned by aliyun? Or do we need to adjust upsertToolCall? Thanks:)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions