Spaces:
Running
Running
DeL-TaiseiOzaki
commited on
Commit
β’
f9e7819
1
Parent(s):
99ec78a
- services/llm_service.py +4 -2
services/llm_service.py
CHANGED
@@ -93,7 +93,8 @@ class LLMService:
|
|
93 |
print("Using Claude API") # γγγγ°η¨εΊε
|
94 |
response = self.claude_client.messages.create(
|
95 |
model="claude-3-5-sonnet-latest",
|
96 |
-
messages=self._format_messages_for_claude()
|
|
|
97 |
)
|
98 |
answer = response.content[0].text
|
99 |
|
@@ -101,7 +102,8 @@ class LLMService:
|
|
101 |
print("Using GPT API") # γγγγ°η¨εΊε
|
102 |
response = self.openai_client.chat.completions.create(
|
103 |
model="gpt-4o",
|
104 |
-
messages=self._format_messages_for_gpt()
|
|
|
105 |
)
|
106 |
answer = response.choices[0].message.content
|
107 |
|
|
|
93 |
print("Using Claude API") # γγγγ°η¨εΊε
|
94 |
response = self.claude_client.messages.create(
|
95 |
model="claude-3-5-sonnet-latest",
|
96 |
+
messages=self._format_messages_for_claude(),
|
97 |
+
max_tokens=1024
|
98 |
)
|
99 |
answer = response.content[0].text
|
100 |
|
|
|
102 |
print("Using GPT API") # γγγγ°η¨εΊε
|
103 |
response = self.openai_client.chat.completions.create(
|
104 |
model="gpt-4o",
|
105 |
+
messages=self._format_messages_for_gpt(),
|
106 |
+
max_tokens=1024
|
107 |
)
|
108 |
answer = response.choices[0].message.content
|
109 |
|