[autogen.oai.client: 09-05 14:32:12] {164} WARNING - The API key specified is not a valid OpenAI format; it won't work with the OpenAI-hosted model.
[autogen.oai.client: 09-05 14:32:12] {164} WARNING - The API key specified is not a valid OpenAI format; it won't work with the OpenAI-hosted model.
user_proxy (to assistant):
Write python code to output numbers 1 to 100
--------------------------------------------------------------------------------
Traceback (most recent call last):
File "c:\Users\HP\Desktop\prj\autogen-ve\Scripts\runningBots.py", line 42, in
assistant = autogen.AssistantAgent( name="assistant", llm_config=llm_config, system_message="Chief technical officer of a tech company" )
user_proxy = autogen.UserProxyAgent( name="user_proxy", human_input_mode="ALWAYS", max_consecutive_auto_reply=10, is_termination_msg=lambda x: x.get("content", "").rstrip().endswith("TERMINATE"), code_execution_config={"work_dir": "web"}, llm_config=llm_config, system_message="""Reply TERMINATE if the task has been solved at full satisfaction. Otherwise, reply CONTINUE, or the reason why the task is not solved yet.""" )
task = """ Write python code to output numbers 1 to 100 """
user_proxy.initiate_chat( assistant, message=task ) [/code] когда я пытаюсь запустить Python, он выдает следующую ошибку: [b]Completions.create() получил неожиданный аргумент ключевого слова ' request_timeout'[/b] [code][autogen.oai.client: 09-05 14:32:12] {164} WARNING - The API key specified is not a valid OpenAI format; it won't work with the OpenAI-hosted model. [autogen.oai.client: 09-05 14:32:12] {164} WARNING - The API key specified is not a valid OpenAI format; it won't work with the OpenAI-hosted model. user_proxy (to assistant):
Write python code to output numbers 1 to 100
-------------------------------------------------------------------------------- Traceback (most recent call last): File "c:\Users\HP\Desktop\prj\autogen-ve\Scripts\runningBots.py", line 42, in [/code] Как это решить?
Я пытаюсь использовать OpenAI API, версия OpenAI — 0.28.0. Ниже приведен мой код. Итак, при попытке запуска возникает ошибка (ошибка OpenAI: неверный URL-адрес (POST/v1/completions/chat/completions)) Спасибо за любую помощь.
import asyncio