Spaces:
Sleeping
Sleeping
bilalsxadad1231231
commited on
Commit
·
a3348ad
1
Parent(s):
bf78a48
Update AI service and configuration for improved functionality
Browse files- app/core/config.py +1 -2
- app/services/ai_service.py +1 -1
- app/services/translation_service.py +1 -1
app/core/config.py
CHANGED
@@ -12,7 +12,7 @@ class Settings(BaseSettings):
|
|
12 |
DATABASE_URL: str = "sqlite:///./todo_app.db"
|
13 |
|
14 |
# Groq Configuration
|
15 |
-
GROQ_API_KEY: str
|
16 |
GROQ_MODEL_NAME: str = "llama3-8b-8192"
|
17 |
|
18 |
# CORS
|
@@ -23,6 +23,5 @@ class Settings(BaseSettings):
|
|
23 |
|
24 |
class Config:
|
25 |
env_file = ".env"
|
26 |
-
case_sensitive = True
|
27 |
|
28 |
settings = Settings()
|
|
|
12 |
DATABASE_URL: str = "sqlite:///./todo_app.db"
|
13 |
|
14 |
# Groq Configuration
|
15 |
+
GROQ_API_KEY: str = ""
|
16 |
GROQ_MODEL_NAME: str = "llama3-8b-8192"
|
17 |
|
18 |
# CORS
|
|
|
23 |
|
24 |
class Config:
|
25 |
env_file = ".env"
|
|
|
26 |
|
27 |
settings = Settings()
|
app/services/ai_service.py
CHANGED
@@ -10,7 +10,7 @@ logger = logging.getLogger(__name__)
|
|
10 |
class AIService:
|
11 |
def __init__(self):
|
12 |
self.llm = ChatGroq(
|
13 |
-
groq_api_key=
|
14 |
model_name=settings.GROQ_MODEL_NAME,
|
15 |
temperature=0.7,
|
16 |
max_tokens=1000
|
|
|
10 |
class AIService:
|
11 |
def __init__(self):
|
12 |
self.llm = ChatGroq(
|
13 |
+
groq_api_key="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",
|
14 |
model_name=settings.GROQ_MODEL_NAME,
|
15 |
temperature=0.7,
|
16 |
max_tokens=1000
|
app/services/translation_service.py
CHANGED
@@ -8,7 +8,7 @@ logger = logging.getLogger(__name__)
|
|
8 |
class TranslationService:
|
9 |
def __init__(self):
|
10 |
self.llm = ChatGroq(
|
11 |
-
groq_api_key=
|
12 |
model_name=settings.GROQ_MODEL_NAME,
|
13 |
temperature=0.1, # Lower temperature for translation accuracy
|
14 |
max_tokens=500
|
|
|
8 |
class TranslationService:
|
9 |
def __init__(self):
|
10 |
self.llm = ChatGroq(
|
11 |
+
groq_api_key="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",
|
12 |
model_name=settings.GROQ_MODEL_NAME,
|
13 |
temperature=0.1, # Lower temperature for translation accuracy
|
14 |
max_tokens=500
|