vasanthfeb13 commited on
Commit
d56fc93
·
1 Parent(s): 7c994c4

Fix: Remove duplicate json argument and propagate timeout correctly

Browse files
src/nacc_orchestrator/blaxel_backend.py CHANGED
@@ -92,15 +92,16 @@ class BlaxelBackend:
92
 
93
  # Build request based on endpoint type
94
  if self.endpoint_type == "openai":
95
- return self._complete_openai(prompt, context, headers)
96
  else:
97
- return self._complete_gemini(prompt, context, headers)
98
 
99
  def _complete_openai(
100
  self,
101
  prompt: str,
102
  context: dict[str, Any] | None,
103
- headers: dict[str, str]
 
104
  ) -> str:
105
  """Complete using OpenAI-compatible API."""
106
  # Build messages
@@ -150,7 +151,8 @@ class BlaxelBackend:
150
  self,
151
  prompt: str,
152
  context: dict[str, Any] | None,
153
- headers: dict[str, str]
 
154
  ) -> str:
155
  """Complete using Gemini API format."""
156
  # Build prompt with context
 
92
 
93
  # Build request based on endpoint type
94
  if self.endpoint_type == "openai":
95
+ return self._complete_openai(prompt, context, headers, timeout=timeout)
96
  else:
97
+ return self._complete_gemini(prompt, context, headers, timeout=timeout)
98
 
99
  def _complete_openai(
100
  self,
101
  prompt: str,
102
  context: dict[str, Any] | None,
103
+ headers: dict[str, str],
104
+ timeout: float | None = None
105
  ) -> str:
106
  """Complete using OpenAI-compatible API."""
107
  # Build messages
 
151
  self,
152
  prompt: str,
153
  context: dict[str, Any] | None,
154
+ headers: dict[str, str],
155
+ timeout: float | None = None
156
  ) -> str:
157
  """Complete using Gemini API format."""
158
  # Build prompt with context