camparchimedes commited on
Commit
3dffd82
ยท
verified ยท
1 Parent(s): 335fa81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -68,16 +68,15 @@ API URL:
68
  api_url_prompt = PromptTemplate(input_variables=['api_docs', 'question'],
69
  template=api_url_template)
70
 
 
71
  api_response_template = """
72
  With the API Documentation for Daysoff's official API: {api_docs} in mind,
73
- and IF user question: {question} contains an alphanumeric identifier consisting of
74
- 6 letters followed by 6 digits (e.g., DAGHNS116478),
75
- and given this API URL: {api_url} for querying, here is the
76
- response from Daysoff's API: {api_response}.
77
  Please provide an summary that directly addresses the user's question,
78
  omitting technical details like response format, and
79
  focusing on delivering the answer with clarity and conciseness,
80
- as if Daysoff's human customer service agent is providing this information themselves.
81
  Summary:
82
  """
83
 
@@ -90,7 +89,7 @@ api_response_prompt = PromptTemplate(
90
  def setup_multiple_chains():
91
 
92
  llm = HuggingFaceEndpoint(
93
- repo_id="google/gemma-2-2b-it",
94
  huggingfacehub_api_token=HUGGINGFACEHUB_API_TOKEN,
95
  #max_new_tokens=512,
96
  temperature=0.7,
 
68
  api_url_prompt = PromptTemplate(input_variables=['api_docs', 'question'],
69
  template=api_url_template)
70
 
71
+ # (..) If {question} contains an alphanumeric identifier consisting of 6 letters followed by 6 digits (e.g., DAGHNS116478)
72
  api_response_template = """
73
  With the API Documentation for Daysoff's official API: {api_docs} in mind,
74
+ and user question: {question}, and given this API URL: {api_url} for querying,
75
+ here is the response from Daysoff's API: {api_response}.
 
 
76
  Please provide an summary that directly addresses the user's question,
77
  omitting technical details like response format, and
78
  focusing on delivering the answer with clarity and conciseness,
79
+ as if a human customer service agent is providing this information.
80
  Summary:
81
  """
82
 
 
89
  def setup_multiple_chains():
90
 
91
  llm = HuggingFaceEndpoint(
92
+ repo_id="google/gemma-2-9b-it",
93
  huggingfacehub_api_token=HUGGINGFACEHUB_API_TOKEN,
94
  #max_new_tokens=512,
95
  temperature=0.7,