Spaces:
Sleeping
Sleeping
Commit
·
febf236
1
Parent(s):
fddbc1a
asdf
Browse files
app.py
CHANGED
@@ -12,14 +12,11 @@ app = FastAPI()
|
|
12 |
class SearchQuery(BaseModel):
|
13 |
query: str
|
14 |
|
15 |
-
# Check if API key exists
|
16 |
-
if not os.getenv("GROQ_API_KEY"):
|
17 |
-
raise ValueError("GROQ_API_KEY environment variable is not set")
|
18 |
-
|
19 |
# Initialize LangChain with Groq
|
20 |
llm = ChatGroq(
|
21 |
temperature=0.7,
|
22 |
-
model_name="mixtral-8x7b-32768",
|
|
|
23 |
)
|
24 |
|
25 |
prompt_template = PromptTemplate(
|
|
|
12 |
class SearchQuery(BaseModel):
|
13 |
query: str
|
14 |
|
|
|
|
|
|
|
|
|
15 |
# Initialize LangChain with Groq
|
16 |
llm = ChatGroq(
|
17 |
temperature=0.7,
|
18 |
+
model_name="mixtral-8x7b-32768",
|
19 |
+
groq_api_key="gsk_your_actual_api_key_here" # Replace with your actual Groq API key
|
20 |
)
|
21 |
|
22 |
prompt_template = PromptTemplate(
|