Initial commit
Browse files- __pycache__/app.cpython-311.pyc +0 -0
- app.py +1 -1
- services/__pycache__/llm_service.cpython-311.pyc +0 -0
- services/llm_service.py +3 -3
__pycache__/app.cpython-311.pyc
CHANGED
|
Binary files a/__pycache__/app.cpython-311.pyc and b/__pycache__/app.cpython-311.pyc differ
|
|
|
app.py
CHANGED
|
@@ -18,7 +18,7 @@ from services.llm_service import LLMFactory
|
|
| 18 |
from services.stream_service import StreamService
|
| 19 |
from services.transcription_service import TranscriptionService
|
| 20 |
from services.tts_service import TTSFactory
|
| 21 |
-
from openai import
|
| 22 |
|
| 23 |
dotenv.load_dotenv()
|
| 24 |
app = FastAPI()
|
|
|
|
| 18 |
from services.stream_service import StreamService
|
| 19 |
from services.transcription_service import TranscriptionService
|
| 20 |
from services.tts_service import TTSFactory
|
| 21 |
+
from openai import Client
|
| 22 |
|
| 23 |
dotenv.load_dotenv()
|
| 24 |
app = FastAPI()
|
services/__pycache__/llm_service.cpython-311.pyc
CHANGED
|
Binary files a/services/__pycache__/llm_service.cpython-311.pyc and b/services/__pycache__/llm_service.cpython-311.pyc differ
|
|
|
services/llm_service.py
CHANGED
|
@@ -6,7 +6,7 @@ import openai
|
|
| 6 |
from abc import ABC, abstractmethod
|
| 7 |
from typing import Any, Dict, List
|
| 8 |
import anthropic
|
| 9 |
-
import
|
| 10 |
from functions.function_manifest import tools
|
| 11 |
from logger_config import get_logger
|
| 12 |
from services.call_context import CallContext
|
|
@@ -124,9 +124,9 @@ class OpenAIService(AbstractLLMService):
|
|
| 124 |
self.user_context.append({"role": role, "content": text, "name": name})
|
| 125 |
messages = [{"role": "system", "content": self.system_message}] + self.user_context
|
| 126 |
|
| 127 |
-
client = openai.
|
| 128 |
stream = await client.chat.completions.create(
|
| 129 |
-
model="gpt-
|
| 130 |
messages=messages,
|
| 131 |
tools=tools,
|
| 132 |
tool_choice="auto",
|
|
|
|
| 6 |
from abc import ABC, abstractmethod
|
| 7 |
from typing import Any, Dict, List
|
| 8 |
import anthropic
|
| 9 |
+
import Client
|
| 10 |
from functions.function_manifest import tools
|
| 11 |
from logger_config import get_logger
|
| 12 |
from services.call_context import CallContext
|
|
|
|
| 124 |
self.user_context.append({"role": role, "content": text, "name": name})
|
| 125 |
messages = [{"role": "system", "content": self.system_message}] + self.user_context
|
| 126 |
|
| 127 |
+
client = openai.Client(api_key=self.api_key)
|
| 128 |
stream = await client.chat.completions.create(
|
| 129 |
+
model="gpt-4o",
|
| 130 |
messages=messages,
|
| 131 |
tools=tools,
|
| 132 |
tool_choice="auto",
|