AI4Finance-Foundation / AI4Finance-Foundation/FinRobot

ImportError: A module needed for autogen.oai.client.create_openai_client is missing: - 'openai' is not installed. Please install it using: 'pip install ag2[openai]

Aperta
#64 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Jupyter Notebook
Stelle
8k
Fork
1.4k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I'm running the agent_rag_qa_up.ipynb in tutorials_beginner folder this part and got this issue even though I install the requirements.txt and have correct config

from autogen import ConversableAgent
import os

config_list = autogen.config_list_from_json(
"../OAI_CONFIG_LIST",
filter_dict={
"model": ["gpt-3.5-turbo"],
},
)
llm_config = {
"config_list": config_list,
"timeout": 120,
# "temperature": 0 # for debug convenience
"temperature": 0.5,
}
user_proxy = ConversableAgent(
name = "Planner Admin",
system_message=system_msg,
code_execution_config=False,
llm_config=llm_config,
human_input_mode="NEVER",
is_termination_msg=lambda msg: "TERMINATE" in msg["content"],
)
tool_proxy = ConversableAgent(
name="Tool Proxy",
system_message="Analyze the response from user proxy and decide whether the suggested database is suitable "
". Answer in simple yes or no",
llm_config=False,
default_auto_reply="Please select the right database.",
human_input_mode="ALWAYS",
)

tools_dict = {
"sec":[query_database_sec,"Tool to query SEC filings database"],
"earnings_call": [query_database_earnings_call, "Tool to query earnings call transcripts database"],
}

And I got into this bug log

---> [17](vscode-notebook-cell:?execution_count=62&line=17) user_proxy = ConversableAgent(
[18](vscode-notebook-cell:?execution_count=62&line=18) name = "Planner Admin",
[19](vscode-notebook-cell:?execution_count=62&line=19) system_message=system_msg,
[20](vscode-notebook-cell:?execution_count=62&line=20) code_execution_config=False,
[21](vscode-notebook-cell:?execution_count=62&line=21) llm_config=llm_config,
[22](vscode-notebook-cell:?execution_count=62&line=22) human_input_mode="NEVER",
[23](vscode-notebook-cell:?execution_count=62&line=23) is_termination_msg=lambda msg: "TERMINATE" in msg["content"],
[24](vscode-notebook-cell:?execution_count=62&line=24) )
[25](vscode-notebook-cell:?execution_count=62&line=25) tool_proxy = ConversableAgent(
[26](vscode-notebook-cell:?execution_count=62&line=26) name="Tool Proxy",
...

ImportError: A module needed for autogen.oai.client.create_openai_client is missing:
- 'openai' is not installed.
Please install it using:
'pip install ag2[openai]'

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.