mMrBun / AIPC

Apache License 2.0
56 stars 20 forks source link

执行报错 #6

Closed bravelll closed 8 months ago

bravelll commented 8 months ago

File "/u01/liuys/anaconda3/envs/chatglm3/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "/u01/liuys/anaconda3/envs/chatglm3/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run result = context.run(func, args) File "/u01/liuys/anaconda3/envs/chatglm3/lib/python3.10/site-packages/gradio/utils.py", line 661, in wrapper response = f(args, *kwargs) File "/u01/liuys/Chat2BI/web_server/web_demo.py", line 19, in text_analysis response, code, history = function_calling(text, top_k, top_p, temperature, model_type) File "/u01/liuys/Chat2BI/web_server/function_call/build_function_call_pipline.py", line 34, in function_calling response, code, history = class_instance.do_chat(query=query, File "/u01/liuys/Chat2BI/llms/qwen/qwen_function_calling.py", line 148, in do_chat response, code, history = self.llm_with_plugin(prompt=query, File "/u01/liuys/Chat2BI/llms/qwen/qwen_function_calling.py", line 60, in llm_with_plugin chart_code = self.create_echarts_code(last_observation) File "/u01/liuys/Chat2BI/llms/qwen/qwen_function_calling.py", line 67, in create_echarts_code output = self.model.generate(query=echarts_prompt, tokenizer=self.tokenizer, history=[]) File "/u01/liuys/.cache/huggingface/modules/transformers_modules/Qwen/Qwen-7B-Chat/be72f02dd47087f9035ee9bb5dea571b84785d27/modeling_qwen.py", line 1259, in generate return super().generate( File "/u01/liuys/anaconda3/envs/chatglm3/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(args, **kwargs) File "/u01/liuys/anaconda3/envs/chatglm3/lib/python3.10/site-packages/transformers/generation/utils.py", line 1271, in generate self._validate_model_kwargs(model_kwargs.copy()) File "/u01/liuys/anaconda3/envs/chatglm3/lib/python3.10/site-packages/transformers/generation/utils.py", line 1144, in _validate_model_kwargs raise ValueError( ValueError: The following model_kwargs are not used by the model: ['query', 'tokenizer', 'history'] (note: typos in the generate arguments will also show up in this list)

mMrBun commented 8 months ago

@bravelll 请更新代码