From cdc0774fe7ddd87e0d961c5d088788db0fc9ad8c Mon Sep 17 00:00:00 2001 From: Berack96 Date: Mon, 27 Oct 2025 21:01:38 +0100 Subject: [PATCH] fix spaces --- .env.example | 4 ++++ pyproject.toml | 5 ----- src/app/configs.py | 1 + src/app/interface/chat.py | 6 ++---- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.env.example b/.env.example index cb28081..ed07ccd 100644 --- a/.env.example +++ b/.env.example @@ -7,10 +7,14 @@ GOOGLE_API_KEY= # https://platform.openai.com/settings/organization/api-keys OPENAI_API_KEY= + # https://admin.mistral.ai/organization/api-keys MISTRAL_API_KEY= + # https://platform.deepseek.com/api_keys DEEPSEEK_API_KEY= + + ############################################################################### # Configurazioni per gli agenti di mercato ############################################################################### diff --git a/pyproject.toml b/pyproject.toml index 31d11dd..eb9343d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,6 @@ requires-python = "==3.12.*" # Per ogni roba ho fatto un commento per evitare di dimenticarmi cosa fa chi. # Inoltre ho messo una emoji per indicare se รจ raccomandato o meno. dependencies = [ - "pytest", # Test "dotenv", # Gestire variabili d'ambiente (generalmente API keys od opzioni) "gradio", # UI web semplice con user_input e output @@ -29,8 +28,6 @@ dependencies = [ "mistralai", "deepseek", - - # API di exchange di criptovalute "coinbase-advanced-py", "python-binance", @@ -47,8 +44,6 @@ dependencies = [ # Per telegram bot "python-telegram-bot", # Interfaccia Telegram Bot "markdown-pdf", # Per convertire markdown in pdf - - ] [tool.pytest.ini_options] diff --git a/src/app/configs.py b/src/app/configs.py index a28132b..17d7bb5 100644 --- a/src/app/configs.py +++ b/src/app/configs.py @@ -23,6 +23,7 @@ class AppModel(BaseModel): name: str = "gemini-2.0-flash" label: str = "Gemini" model: type[Model] | None = None + def get_model(self, instructions: str) -> Model: """ Restituisce un'istanza del modello specificato. diff --git a/src/app/interface/chat.py b/src/app/interface/chat.py index b7e2a4f..8d626c0 100644 --- a/src/app/interface/chat.py +++ b/src/app/interface/chat.py @@ -84,16 +84,14 @@ class ChatManager: label="Modello da usare" ) provider.change(fn=self.inputs.choose_team_leader, inputs=provider, outputs=None) - provider.value = self.inputs.team_leader_model.label - strategy = gr.Dropdown( + style = gr.Dropdown( choices=self.inputs.list_strategies_names(), value=self.inputs.strategy.label, type="index", label="Stile di investimento" ) - strategy.change(fn=self.inputs.choose_strategy, inputs=strategy, outputs=None) - strategy.value = self.inputs.strategy.label + style.change(fn=self.inputs.choose_strategy, inputs=style, outputs=None) chat = gr.ChatInterface( fn=self.gradio_respond