AI4Finance-Foundation / AI4Finance-Foundation/FinRobot
Too Many Requests. Rate limited. Try after a while
- Dominant language
- Jupyter Notebook
- Stars
- 8k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
import os
import autogen
from textwrap import dedent
from finrobot.utils import register_keys_from_json
from finrobot.agents.workflow import SingleAssistantShadow
llm_config = {
"config_list": autogen.config_list_from_json(
"OAI_CONFIG_LIST",
filter_dict={
"model": ["gpt-4-0125-preview"],
},
),
"timeout": 120,
"temperature": 0.5,
}
register_keys_from_json("config_api_keys")
work_dir = "report"
os.makedirs(work_dir, exist_ok=True)
assistant = SingleAssistantShadow(
"Expert_Investor",
llm_config,
max_consecutive_auto_reply=None,
human_input_mode="TERMINATE",
)
company = "NVDA"
fyear = "2025"
message = dedent(
f"""
With the tools you've been provided, write an annual report based on {company}'s {fyear} 10-k report, format it into a pdf.
Pay attention to the followings:
- Explicitly explain your working plan before you kick off.
- Use tools one by one for clarity, especially when asking for instructions.
- All your file operations should be done in "{work_dir}".
- Display any image in the chat once generated.
- All the paragraphs should combipyne between 400 and 450 words, don't generate the pdf until this is explicitly fulfilled.
"""
)
assistant.chat(message, use_cache=True, max_turns=50,
summary_method="last_msg")
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.