You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Markdown Render Support to GPT completions (#56)
* Add Markdown support. Use rehype-raw to retain raw innerHTML
* Rm extra whitespace breaks
* Replace python-jose with pyjwt.
* Replace non-existent get_unverified_claims function
* Change Exception to handle JWT-specific errors
* Convert the public key to PEM format
* Add pem format tests
* Another test, plus autherror fixes
* Remove directives to not return markdown.
* Add table support
* Update snapshots with new system prompt
---------
Co-authored-by: pmorgen <[email protected]>
Co-authored-by: Pamela Fox <[email protected]>
Co-authored-by: Pamela Fox <[email protected]>
Copy file name to clipboardExpand all lines: app/backend/approaches/chatreadretrieveread.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ def __init__(
57
57
defsystem_message_chat_conversation(self):
58
58
return"""Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.
59
59
Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.
60
-
For tabular information return it as an html table. Do not return markdown format. If the question is not in English, answer in the language used in the question.
60
+
If the question is not in English, answer in the language used in the question.
61
61
Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].
Copy file name to clipboardExpand all lines: tests/snapshots/test_app/test_ask_rtr_hybrid/client0/result.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@
46
46
},
47
47
{
48
48
"description": [
49
-
"{'role': 'system', 'content': \"You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. For tabular information return it as an html table. Do not return markdown format. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer\"}",
49
+
"{'role': 'system', 'content': \"You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer\"}",
50
50
"{'role': 'user', 'content': \"\\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\\n\\nSources:\\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\\ninfo2.pdf: Overlake is in-network for the employee plan.\\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\\n\"}",
51
51
"{'role': 'assistant', 'content': 'In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].'}",
52
52
"{'role': 'user', 'content': 'What is the capital of France?\\nSources:\\n Benefit_Options-2.pdf: There is a whistleblower policy.'}"
0 commit comments