AI4Finance-Foundation / AI4Finance-Foundation/FinRobot

Too Many Requests. Rate limited. Try after a while

Aperta
#61 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

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")

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.