rm debug log
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user