mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-16 04:29:31 +00:00
ci: retrigger checks and fix linting
This commit is contained in:
parent
be1ba7fe94
commit
453d8366fe
1 changed files with 3 additions and 7 deletions
|
|
@ -182,22 +182,18 @@ class GenAIHubOrchestrationConfig(OpenAIGPTConfig):
|
|||
|
||||
def _resolve_deployment_url(self) -> str:
|
||||
client = litellm.module_level_client
|
||||
deployments = client.get(
|
||||
f"{self.base_url}/lm/deployments", headers=self.headers
|
||||
).json()
|
||||
deployments = client.get(f"{self.base_url}/lm/deployments", headers=self.headers).json()
|
||||
|
||||
valid: List[Tuple[str, str, str]] = []
|
||||
for dep in deployments.get("resources", []):
|
||||
if dep.get("scenarioId") != "orchestration":
|
||||
continue
|
||||
cfg = client.get(
|
||||
f'{self.base_url}/lm/configurations/{dep["configurationId"]}',
|
||||
f"{self.base_url}/lm/configurations/{dep['configurationId']}",
|
||||
headers=self.headers,
|
||||
).json()
|
||||
if cfg.get("executableId") == "orchestration":
|
||||
valid.append(
|
||||
(dep["deploymentUrl"], dep["createdAt"], cfg.get("name", ""))
|
||||
)
|
||||
valid.append((dep["deploymentUrl"], dep["createdAt"], cfg.get("name", "")))
|
||||
|
||||
if not valid:
|
||||
raise GenAIHubOrchestrationError(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue