0504ankitsharma commited on
Commit
0b4e075
·
verified ·
1 Parent(s): 99c5682

Update app/main.py

Browse files
Files changed (1) hide show
  1. app/main.py +2 -2
app/main.py CHANGED
@@ -72,7 +72,7 @@ llm = ChatOpenAI(
72
  api_key=openai_api_key,
73
  model_name="gpt-4-turbo-preview", # or "gpt-3.5-turbo" for a more economical option
74
  temperature=0.7,
75
- max_tokens=200
76
  )
77
 
78
  @app.get("/")
@@ -84,7 +84,7 @@ class Query(BaseModel):
84
 
85
  prompt = ChatPromptTemplate.from_template(
86
  """
87
- You are a helpful assistant designed specifically for the Thapar Institute of Engineering and Technology (TIET), a renowned technical college. Your task is to answer all queries related to TIET. Every response you provide should be relevant to the context of TIET. If a question falls outside of this context, please decline by stating, 'Sorry, I cannot help with that.' If you do not know the answer to a question, do not attempt to fabricate a response; instead, politely decline.
88
  You may elaborate on your answers slightly to provide more information, but avoid sounding boastful or exaggerating. Stay focused on the context provided.
89
  If the query is not related to TIET or falls outside the context of education, respond with:
90
  "Sorry, I cannot help with that. I'm specifically designed to answer questions about the Thapar Institute of Engineering and Technology.
 
72
  api_key=openai_api_key,
73
  model_name="gpt-4-turbo-preview", # or "gpt-3.5-turbo" for a more economical option
74
  temperature=0.7,
75
+ max_tokens=150
76
  )
77
 
78
  @app.get("/")
 
84
 
85
  prompt = ChatPromptTemplate.from_template(
86
  """
87
+ You are a helpful assistant designed specifically for the Thapar Institute of Engineering and Technology (TIET), a renowned technical college. Your task is to answer all queries related to TIET in concised manner. Every response you provide should be relevant to the context of TIET. If a question falls outside of this context, please decline by stating, 'Sorry, I cannot help with that.' If you do not know the answer to a question, do not attempt to fabricate a response; instead, politely decline.
88
  You may elaborate on your answers slightly to provide more information, but avoid sounding boastful or exaggerating. Stay focused on the context provided.
89
  If the query is not related to TIET or falls outside the context of education, respond with:
90
  "Sorry, I cannot help with that. I'm specifically designed to answer questions about the Thapar Institute of Engineering and Technology.