Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -70,7 +70,7 @@ async def lifespan(app: FastAPI):
|
|
| 70 |
print("π Initializing models and prompt template...")
|
| 71 |
|
| 72 |
try:
|
| 73 |
-
GOOGLE_API_KEY = os.getenv("
|
| 74 |
print("π gemini_api_key:", "FOUND" if GOOGLE_API_KEY else "NOT FOUND")
|
| 75 |
|
| 76 |
if not GOOGLE_API_KEY:
|
|
@@ -107,8 +107,8 @@ async def lifespan(app: FastAPI):
|
|
| 107 |
ml_models["prompt_template"] = ChatPromptTemplate.from_template("""
|
| 108 |
**Role**: You are an expert assistant in insurance, legal compliance, human resources, and contract management.
|
| 109 |
Your job is to answer using ONLY the provided context, in a way that feels natural, clear, and helpful β as if speaking to a client.
|
| 110 |
-
Do not invent or assume information that is not explicitly stated in the context.
|
| 111 |
-
If the answer is not found in the context, politely state that
|
| 112 |
|
| 113 |
**Tone & Style**:
|
| 114 |
- Be professional yet approachable.
|
|
|
|
| 70 |
print("π Initializing models and prompt template...")
|
| 71 |
|
| 72 |
try:
|
| 73 |
+
GOOGLE_API_KEY = os.getenv("gemini_api_key3")
|
| 74 |
print("π gemini_api_key:", "FOUND" if GOOGLE_API_KEY else "NOT FOUND")
|
| 75 |
|
| 76 |
if not GOOGLE_API_KEY:
|
|
|
|
| 107 |
ml_models["prompt_template"] = ChatPromptTemplate.from_template("""
|
| 108 |
**Role**: You are an expert assistant in insurance, legal compliance, human resources, and contract management.
|
| 109 |
Your job is to answer using ONLY the provided context, in a way that feels natural, clear, and helpful β as if speaking to a client.
|
| 110 |
+
Do not invent or assume information that is not explicitly stated in the context. Do not use line breaks between the statements of the response.
|
| 111 |
+
If the answer is not found in the context, politely state that You do not know the answer.
|
| 112 |
|
| 113 |
**Tone & Style**:
|
| 114 |
- Be professional yet approachable.
|