Daemontatox commited on
Commit
936fd23
·
verified ·
1 Parent(s): 3206d9d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -10
app.py CHANGED
@@ -28,6 +28,7 @@ from langchain_huggingface.llms import HuggingFacePipeline
28
  import re
29
  from langchain_huggingface.llms import HuggingFacePipeline
30
  from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline,BitsAndBytesConfig,TextIteratorStreamer
 
31
 
32
 
33
  # Configure logging
@@ -135,18 +136,23 @@ retriever = db.as_retriever(
135
  # )
136
 
137
 
138
- llm = ChatOpenAI(
139
- # base_url="https://openrouter.ai/api/v1",
140
- base_url="https://api.cerebras.ai/v1/chat/completions",
141
- temperature=0,
142
- api_key=C_apikey,
143
- model="llama-3.3-70b",
144
- max_tokens=None,
145
- timeout=None,
146
- stream=True
147
 
148
- )
 
149
 
 
 
 
 
 
150
 
151
 
152
 
 
28
  import re
29
  from langchain_huggingface.llms import HuggingFacePipeline
30
  from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline,BitsAndBytesConfig,TextIteratorStreamer
31
+ from langchain_cerebras import ChatCerebras
32
 
33
 
34
  # Configure logging
 
136
  # )
137
 
138
 
139
+ # llm = ChatOpenAI(
140
+ # base_url="https://openrouter.ai/api/v1",
141
+ # temperature=0,
142
+ # api_key=ChatOpenAI,
143
+ # model="google/gemini-2.0-flash-thinking-exp:free",
144
+ # max_tokens=None,
145
+ # timeout=None,
146
+ # stream=True
 
147
 
148
+ # )
149
+
150
 
151
+ llm = ChatCerebras(
152
+ model="llama-3.3-70b",
153
+ api_key=C_apikey,
154
+ stream=true
155
+ )
156
 
157
 
158