Update app.py
Browse files
app.py
CHANGED
@@ -109,10 +109,7 @@ def setup_multiple_chains():
|
|
109 |
llm_chain = LLMChain(
|
110 |
llm=llm,
|
111 |
prompt=daysoff_assistant_prompt,
|
112 |
-
memory=conversation_memory
|
113 |
-
api_docs=api_docs_str,
|
114 |
-
api_url_prompt=api_url_prompt,
|
115 |
-
api_response_prompt=api_response_prompt
|
116 |
)
|
117 |
|
118 |
cl.user_session.set("llm_chain", llm_chain)
|
@@ -154,8 +151,9 @@ async def handle_message(message: cl.Message):
|
|
154 |
|
155 |
booking_pattern = r'\b[A-Z]{6}\d{6}\b'
|
156 |
match = re.search(booking_pattern, user_message)
|
157 |
-
|
158 |
-
|
|
|
159 |
bestillingskode = match.group()
|
160 |
endpoint_url = "https://aivisions.no/data/daysoff/api/v1/booking/"
|
161 |
|
|
|
109 |
llm_chain = LLMChain(
|
110 |
llm=llm,
|
111 |
prompt=daysoff_assistant_prompt,
|
112 |
+
memory=conversation_memory
|
|
|
|
|
|
|
113 |
)
|
114 |
|
115 |
cl.user_session.set("llm_chain", llm_chain)
|
|
|
151 |
|
152 |
booking_pattern = r'\b[A-Z]{6}\d{6}\b'
|
153 |
match = re.search(booking_pattern, user_message)
|
154 |
+
|
155 |
+
|
156 |
+
if match:
|
157 |
bestillingskode = match.group()
|
158 |
endpoint_url = "https://aivisions.no/data/daysoff/api/v1/booking/"
|
159 |
|