From cf4d9b63c7104ad34922d3d301100dbeb39a8d34 Mon Sep 17 00:00:00 2001 From: martin legrand Date: Thu, 27 Mar 2025 11:59:10 +0100 Subject: [PATCH] rm debug log --- README.md | 4 +++- sources/llm_provider.py | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f60ac2f..8301f28 100644 --- a/README.md +++ b/README.md @@ -262,10 +262,12 @@ Set the desired provider in the `config.ini` [MAIN] is_local = False provider_name = openai -provider_model = gpt4o +provider_model = gpt-4o provider_server_address = 127.0.0.1:5000 ``` +WARNING: Make sure there is not trailing space in the config. + Set `is_local` to True if using a local openai-based api. Change the IP address if your openai-based api run on your own server. diff --git a/sources/llm_provider.py b/sources/llm_provider.py index dc304d1..66addbf 100644 --- a/sources/llm_provider.py +++ b/sources/llm_provider.py @@ -171,11 +171,10 @@ class Provider: Use openai to generate text. """ if self.is_local: - print("Using local OpenAI server") client = OpenAI(api_key=self.api_key, base_url=base_url) else: - print("Using OpenAI API") client = OpenAI(api_key=self.api_key) + try: response = client.chat.completions.create( model=self.model,