singhankur01 commited on
Commit
0cb056b
·
verified ·
1 Parent(s): 7b17c7b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -125,7 +125,8 @@ async def lifespan(app: FastAPI):
125
  ml_models["reranker_compressor"] = CrossEncoderReranker(model=cross_encoder_model, top_n=9)
126
 
127
  ml_models["llm"] = ChatGoogleGenerativeAI(
128
- model="gemini-2.5-flash", #using flash 2.5 as its give better result but slower than lower flash
 
129
  api_key=GOOGLE_API_KEY,
130
  )
131
 
@@ -148,7 +149,7 @@ Step 1 – **Initial Draft**:
148
  - Summarize relevant parts of the context without losing meaning.
149
  - Avoid boilerplate phrases like “the document states” or “according to the context.”
150
  - If the answer is not in the context for some subqueries, respond exactly with: " I do not know the answer of "subquery",Please ask query related to the Document only." for that subquery.
151
- - If the query is not in english language then respond excatly with: "I do not know this language , ask in English Only".
152
 
153
  Step 2 – **Critique & Revise**:
154
  - Review the initial answers for any missing or underused context.
 
125
  ml_models["reranker_compressor"] = CrossEncoderReranker(model=cross_encoder_model, top_n=9)
126
 
127
  ml_models["llm"] = ChatGoogleGenerativeAI(
128
+ # model="gemini-2.5-flash", #using flash 2.5 as its give better result but slower than lower flash
129
+ model="gemini-1.5-flash",
130
  api_key=GOOGLE_API_KEY,
131
  )
132
 
 
149
  - Summarize relevant parts of the context without losing meaning.
150
  - Avoid boilerplate phrases like “the document states” or “according to the context.”
151
  - If the answer is not in the context for some subqueries, respond exactly with: " I do not know the answer of "subquery",Please ask query related to the Document only." for that subquery.
152
+ - Make sure that the You answer the query in the same language in which the query is asked.
153
 
154
  Step 2 – **Critique & Revise**:
155
  - Review the initial answers for any missing or underused context.