Update llm.py
Browse filesUpdated language model versions
llm.py
CHANGED
|
@@ -3,7 +3,7 @@ import openai
|
|
| 3 |
|
| 4 |
class MessageChatCompletion:
|
| 5 |
def __init__(self,
|
| 6 |
-
model: str = 'gpt-
|
| 7 |
message: str = '',
|
| 8 |
api_key: str = '',
|
| 9 |
temperature: float = 0.10,
|
|
@@ -20,7 +20,7 @@ class MessageChatCompletion:
|
|
| 20 |
self.api_key = api_key
|
| 21 |
openai.api_key = self.api_key
|
| 22 |
|
| 23 |
-
if model in ["gpt-
|
| 24 |
self.endpoint = "https://api.openai.com/v1/chat/completions"
|
| 25 |
else:
|
| 26 |
self.endpoint = "https://api.openai.com/v1/completions"
|
|
|
|
| 3 |
|
| 4 |
class MessageChatCompletion:
|
| 5 |
def __init__(self,
|
| 6 |
+
model: str = 'gpt-5-mini',
|
| 7 |
message: str = '',
|
| 8 |
api_key: str = '',
|
| 9 |
temperature: float = 0.10,
|
|
|
|
| 20 |
self.api_key = api_key
|
| 21 |
openai.api_key = self.api_key
|
| 22 |
|
| 23 |
+
if model in ["gpt-4o","gpt-4o-mini","gpt-5-mini","gpt-5"]:
|
| 24 |
self.endpoint = "https://api.openai.com/v1/chat/completions"
|
| 25 |
else:
|
| 26 |
self.endpoint = "https://api.openai.com/v1/completions"
|