shresthasingh commited on
Commit
93aaea3
·
verified ·
1 Parent(s): 586b2db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -42,14 +42,14 @@ def classify_message(message: str) -> str:
42
  messages=[
43
  {
44
  "role": "system",
45
- "content": "Strictly only Classify the following message into one of these categories: create_order, cancel_order, check_order_status, create_invoice, get_invoice_details, create_payment. Respond only with the category name and nothing else , even if its ambgious , give your best classification",
46
  },
47
  {
48
  "role": "user",
49
  "content": message,
50
  },
51
  ],
52
- model="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
53
  )
54
  return classify.choices[0].message.content.strip()
55
 
@@ -122,7 +122,7 @@ def interpret_response(user_message: str, classification: str, api_response: dic
122
  messages=[
123
  {
124
  "role": "system",
125
- "content": "Process user query and automated system API response to form a coherent natural reply that will help the user affirm the situation of their request. Your response will be streamed directly to the user. Do not include the fact that you are reading the API response. It should be natural and helpful. Make sure to give the user the relevant IDs and information, and do not talk more than that. Just give information and that's it.",
126
  },
127
  {
128
  "role": "user",
 
42
  messages=[
43
  {
44
  "role": "system",
45
+ "content": "Strictly only Classify the following message into one of these categories: create_order (for creating an order) , cancel_order (for cancelling an order) , check_order_status (for checking order status and details of the order) , create_invoice (create an invoice) , get_invoice_details (get invoice details) , create_payment. Respond only with the category name and nothing else , even if its ambgious , give your best classification",
46
  },
47
  {
48
  "role": "user",
49
  "content": message,
50
  },
51
  ],
52
+ model="mistralai/Mixtral-8x7B-Instruct-v0.1",
53
  )
54
  return classify.choices[0].message.content.strip()
55
 
 
122
  messages=[
123
  {
124
  "role": "system",
125
+ "content": "Process user query and automated system API response to form a coherent natural reply that will help the user affirm the situation of their request. Your response will be streamed directly to the user. Do not include the fact that you are reading the API response. It should be natural and helpful. Make sure to give the user the relevant IDs and information, be sure to include all the information stated in api response dont leave any detail out even if not requested by user.",
126
  },
127
  {
128
  "role": "user",