Amogh1221 commited on
Commit
73b3d4a
·
verified ·
1 Parent(s): 05f0e0e

Update providers/llms/fallback_llm_provider.py

Browse files
providers/llms/fallback_llm_provider.py CHANGED
@@ -13,10 +13,10 @@ class FallbackLLMProvider:
13
  # This doesn't call an LLM directly, so we just use the first provider's logic
14
  return self.providers[0].generate_opening_context(profile_recap)
15
 
16
- def psychiatrist_response(self, context: list, patient_info: dict = None) -> LLM1Output:
17
  for provider in self.providers:
18
  try:
19
- return provider.psychiatrist_response(context, patient_info)
20
  except Exception as e:
21
  print(f"[FallbackRouter] Provider {type(provider).__name__} failed for LLM1: {e}")
22
  continue
@@ -30,10 +30,10 @@ class FallbackLLMProvider:
30
  clinical_summary=None
31
  )
32
 
33
- def internal_reasoning(self, context: list) -> LLM2Output:
34
  for provider in self.providers:
35
  try:
36
- return provider.internal_reasoning(context)
37
  except Exception as e:
38
  print(f"[FallbackRouter] Provider {type(provider).__name__} failed for LLM2: {e}")
39
  continue
 
13
  # This doesn't call an LLM directly, so we just use the first provider's logic
14
  return self.providers[0].generate_opening_context(profile_recap)
15
 
16
+ def psychiatrist_response(self, context: list, patient_info: dict = None, medium_term_memory: str | None = None) -> LLM1Output:
17
  for provider in self.providers:
18
  try:
19
+ return provider.psychiatrist_response(context, patient_info, medium_term_memory)
20
  except Exception as e:
21
  print(f"[FallbackRouter] Provider {type(provider).__name__} failed for LLM1: {e}")
22
  continue
 
30
  clinical_summary=None
31
  )
32
 
33
+ def internal_reasoning(self, context: list, stable_prefix: str | None = None) -> LLM2Output:
34
  for provider in self.providers:
35
  try:
36
+ return provider.internal_reasoning(context, stable_prefix)
37
  except Exception as e:
38
  print(f"[FallbackRouter] Provider {type(provider).__name__} failed for LLM2: {e}")
39
  continue