Spaces:
Sleeping
Sleeping
Commit
·
3a05d47
1
Parent(s):
09fcad9
fix
Browse files
app.py
CHANGED
|
@@ -53,7 +53,6 @@ prompt = PromptTemplate(
|
|
| 53 |
template=template,
|
| 54 |
)
|
| 55 |
|
| 56 |
-
chain = LLMChain(llm=llm, prompt=prompt)#, callbacks=[QueueCallback])
|
| 57 |
|
| 58 |
pinecone.init(
|
| 59 |
api_key=PINECONE_API_KEY,
|
|
@@ -121,6 +120,8 @@ def stream(input_text, history, user_prompt, topic, topk) -> Generator:
|
|
| 121 |
|
| 122 |
# Create a funciton to call - this will run in a thread
|
| 123 |
def task():
|
|
|
|
|
|
|
| 124 |
tool_resp = query_tool(topic, topk, input_text)
|
| 125 |
|
| 126 |
response = chain({"instuction": user_prompt, "user": input_text, "content": tool_resp})
|
|
|
|
| 53 |
template=template,
|
| 54 |
)
|
| 55 |
|
|
|
|
| 56 |
|
| 57 |
pinecone.init(
|
| 58 |
api_key=PINECONE_API_KEY,
|
|
|
|
| 120 |
|
| 121 |
# Create a funciton to call - this will run in a thread
|
| 122 |
def task():
|
| 123 |
+
chain = LLMChain(llm=llm, prompt=prompt, callbacks=[QueueCallback(q)])
|
| 124 |
+
|
| 125 |
tool_resp = query_tool(topic, topk, input_text)
|
| 126 |
|
| 127 |
response = chain({"instuction": user_prompt, "user": input_text, "content": tool_resp})
|