Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ api_key = "sk-or-v1-c4b5ab803e2d04364769ffbd51dafd34727915b1ba3e22a484024caa25a2
|
|
8 |
|
9 |
openai_client = OpenAI(base_url="https://openrouter.ai/api/v1",api_key=api_key)
|
10 |
|
11 |
-
prompt_template = """Answer the question based only on the information provided below.Instead of directing the user to resources, answer the user using the content of the resources.And dont say anything like "Based on the provided information" etc. in the answer.
|
12 |
## Information :
|
13 |
{}
|
14 |
|
@@ -48,7 +48,7 @@ if st.session_state.stage == "prompt-input":
|
|
48 |
st.markdown(prompt)
|
49 |
|
50 |
st.session_state.messages.append({"role":"user","content":prompt})
|
51 |
-
results = st.session_state.collection.query(query_texts=[prompt],n_results=
|
52 |
infos = results["documents"][0]
|
53 |
|
54 |
info_text = ""
|
|
|
8 |
|
9 |
openai_client = OpenAI(base_url="https://openrouter.ai/api/v1",api_key=api_key)
|
10 |
|
11 |
+
prompt_template = """Answer the question based only on the information provided below.Instead of directing the user to resources, answer the user using the content of the resources.And dont say anything like "Based on the provided information" etc. in the answer.Provide examples based on the users question.For example, when he says "how do i create a slash command" , provide him with an example.
|
12 |
## Information :
|
13 |
{}
|
14 |
|
|
|
48 |
st.markdown(prompt)
|
49 |
|
50 |
st.session_state.messages.append({"role":"user","content":prompt})
|
51 |
+
results = st.session_state.collection.query(query_texts=[prompt],n_results=10)
|
52 |
infos = results["documents"][0]
|
53 |
|
54 |
info_text = ""
|