qbc

Results 29 comments of qbc

这个warning只是表明在format的时候不会将thinking的内容输入到大模型,不是报错,所以不会影响thinking的内容输入,正常情况下是能拿到你上面的think_blocks的,请问能提供下更详细的信息么,或者复现的代码

建议先用这个[例子](https://github.com/agentscope-ai/agentscope/blob/main/examples/functionality/stream_printing_messages/single_agent.py)测一下看看,如果一切正常,那么很有可能是你上面自己代码的bug,需要去仔细check下

> 我启动了这个enable_thinking=True,DashScopeChatModel试了几种模型都会有这个警告。 qwen-max 没有thinking块,qwen-plus系列和deepseek-r1都有thinking,然后都有这个警告。 > > 这个warning不用管的,对于思考模型,有些api在调用的时候需要把reasoning的内容塞进去(比如anthropic),有些不需要(比如dashscope)。这个warning不会影响执行逻辑

> 哦哦哦,那流式输出之后会增加 只输出增量 的方式吗? 目前只会支持累积的方式(主要是因为涉及到类似工具调用的结构化数据的流式传输,只能采用累积的方式),如果是要增量的话,需要自己做后处理(即截断),可以参考[print](https://github.com/agentscope-ai/agentscope/blob/28547e7c83673cc9196f353dd550f89463581042/src/agentscope/agent/_agent_base.py#L205)函数里的处理

Please use `DeepSeekChatFormatter`

> > Please use `DeepSeekChatFormatter` > > 第二个问题确实解决了,第一个还是有问题,应该是传入工具参数的时候有问题,这是传入的工具参数,'tools': [{'type': 'function', 'function': {'name': 'generate_response', 'parameters': {'properties': {'response': {'description': 'Your response to the user.', 'type': 'string'}}, 'required': ['response'], 'type': 'object'},里面有个字段required好像和openai模型不兼容,我在OpenAIChatModel类下加了一行kwargs.pop("tools", None),就没有问题了,但是工具调用应该是用不了了 应该不是工具格式的问题,因为这是function...

我看官方已经提交修复了,可以尝试更新下json_repair的版本,我测了下失败的case,已经可以成功了。

> > > > Please use `DeepSeekChatFormatter` > > > > > > > > > 第二个问题确实解决了,第一个还是有问题,应该是传入工具参数的时候有问题,这是传入的工具参数,'tools': [{'type': 'function', 'function': {'name': 'generate_response', 'parameters': {'properties': {'response': {'description': 'Your response to the...

原因可能是`execute_python_code`的实现在 Windows 上调用 asyncio.create_subprocess_exec 时失败,抛出的异常消息为空。 可以尝试一下自定义一个简单的工具,比如 ``` def add(a: int, b: int) -> ToolResponse: """ Add two numbers. Args: a(`int`): An integer. b(`int`): An integer. Returns: ToolResponse """ return ToolResponse(...