fix
This commit is contained in:
@@ -3,9 +3,6 @@ import openai
|
||||
import yaml
|
||||
from termcolor import colored
|
||||
import os
|
||||
from groq import AsyncGroq
|
||||
from mistralai.client import MistralClient
|
||||
from mistralai.models.chat_completion import ChatMessage
|
||||
|
||||
# load config (apikey, apibase, model)
|
||||
yaml_file = os.path.join(os.getcwd(), "config", "config.yaml")
|
||||
@@ -73,6 +70,7 @@ def LLM_Completion(
|
||||
|
||||
|
||||
async def _achat_completion_stream_groq(messages: list[dict]) -> str:
|
||||
from groq import AsyncGroq
|
||||
client = AsyncGroq(api_key=GROQ_API_KEY)
|
||||
|
||||
max_attempts = 5
|
||||
@@ -103,6 +101,8 @@ async def _achat_completion_stream_groq(messages: list[dict]) -> str:
|
||||
|
||||
|
||||
async def _achat_completion_stream_mixtral(messages: list[dict]) -> str:
|
||||
from mistralai.client import MistralClient
|
||||
from mistralai.models.chat_completion import ChatMessage
|
||||
client = MistralClient(api_key=MISTRAL_API_KEY)
|
||||
# client=AsyncGroq(api_key=GROQ_API_KEY)
|
||||
max_attempts = 5
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM python:3.11.8-alpine3.18
|
||||
FROM python:3.9.19-bookworm
|
||||
WORKDIR /app
|
||||
EXPOSE 8000/tcp
|
||||
|
||||
@@ -16,5 +16,4 @@ ENV OPENAI_API_MODEL=gpt-4-turbo-preview
|
||||
ENV USE_CACHE=False
|
||||
ENV FAST_DESIGN_MODE=True
|
||||
ENV GROQ_API_KEY=
|
||||
ENV MISTRAL_API_KEY=
|
||||
CMD ["python", "server.py", "--port", "8000"]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Flask==3.0.2
|
||||
openai==1.14.2
|
||||
openai==0.28.1
|
||||
PyYAML==6.0.1
|
||||
termcolor==2.4.0
|
||||
groq==0.4.2
|
||||
|
||||
Reference in New Issue
Block a user