Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -91,7 +91,7 @@ api_response_prompt = PromptTemplate(
|
|
91 |
@cl.on_chat_start
|
92 |
def setup_multiple_chains():
|
93 |
|
94 |
-
llm =
|
95 |
repo_id="google/gemma-2-2b-it", #"norallm/normistral-7b-warm-instruct",
|
96 |
huggingfacehub_api_token=HUGGINGFACEHUB_API_TOKEN,
|
97 |
#max_new_tokens=512,
|
@@ -116,7 +116,7 @@ def setup_multiple_chains():
|
|
116 |
api_url_prompt=api_url_prompt,
|
117 |
api_response_prompt=api_response_prompt,
|
118 |
verbose=True,
|
119 |
-
limit_to_domains=["https://670dccd0073307b4ee447f2f.mockapi.io/daysoff/api/V1"]
|
120 |
)
|
121 |
|
122 |
cl.user_session.set("api_chain", api_chain)
|
@@ -149,6 +149,6 @@ async def handle_message(message: cl.Message):
|
|
149 |
|
150 |
|
151 |
response_key = "output" if "output" in response else "text"
|
152 |
-
logging.debug({response}
|
153 |
await cl.Message(response.get(response_key, "")).send()
|
154 |
return message.content
|
|
|
91 |
@cl.on_chat_start
|
92 |
def setup_multiple_chains():
|
93 |
|
94 |
+
llm = HuggingFaceHub(
|
95 |
repo_id="google/gemma-2-2b-it", #"norallm/normistral-7b-warm-instruct",
|
96 |
huggingfacehub_api_token=HUGGINGFACEHUB_API_TOKEN,
|
97 |
#max_new_tokens=512,
|
|
|
116 |
api_url_prompt=api_url_prompt,
|
117 |
api_response_prompt=api_response_prompt,
|
118 |
verbose=True,
|
119 |
+
limit_to_domains=None #["https://670dccd0073307b4ee447f2f.mockapi.io/daysoff/api/V1"]
|
120 |
)
|
121 |
|
122 |
cl.user_session.set("api_chain", api_chain)
|
|
|
149 |
|
150 |
|
151 |
response_key = "output" if "output" in response else "text"
|
152 |
+
logging.debug({response})
|
153 |
await cl.Message(response.get(response_key, "")).send()
|
154 |
return message.content
|