mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
added ruff fixes
This commit is contained in:
parent
27e6ef5f39
commit
3b35ab857f
5 changed files with 5 additions and 10 deletions
|
|
@ -12,9 +12,6 @@ import subprocess
|
|||
import xml.etree.ElementTree as ET
|
||||
from collections import defaultdict
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
import json
|
||||
from typing import Dict, List, Tuple, Optional
|
||||
|
||||
# ANSI color codes for terminal output
|
||||
class Colors:
|
||||
|
|
|
|||
1
cookbook/google_adk_litellm_tutorial.ipynb
vendored
1
cookbook/google_adk_litellm_tutorial.ipynb
vendored
|
|
@ -74,7 +74,6 @@
|
|||
"source": [
|
||||
"# Setup environment and API keys\n",
|
||||
"import os\n",
|
||||
"import asyncio\n",
|
||||
"from google.adk.agents import Agent\n",
|
||||
"from google.adk.models.lite_llm import LiteLlm # For multi-model support\n",
|
||||
"from google.adk.sessions import InMemorySessionService\n",
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class MCPClient:
|
|||
try:
|
||||
await self.connect()
|
||||
return self
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
await self.disconnect()
|
||||
raise
|
||||
|
||||
|
|
@ -93,7 +93,7 @@ class MCPClient:
|
|||
self._session_ctx = ClientSession(self._transport[0], self._transport[1])
|
||||
self._session = await self._session_ctx.__aenter__()
|
||||
await self._session.initialize()
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
await self.disconnect()
|
||||
raise
|
||||
|
||||
|
|
@ -168,7 +168,7 @@ class MCPClient:
|
|||
except asyncio.CancelledError:
|
||||
await self.disconnect()
|
||||
raise
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
await self.disconnect()
|
||||
raise
|
||||
|
||||
|
|
@ -193,7 +193,7 @@ class MCPClient:
|
|||
except asyncio.CancelledError:
|
||||
await self.disconnect()
|
||||
raise
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
await self.disconnect()
|
||||
raise
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import importlib
|
||||
from typing import List, Optional
|
||||
from typing import Optional
|
||||
|
||||
from fastapi import APIRouter, Depends, Query, Request
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import os
|
||||
import json
|
||||
|
||||
mistral_model_cost_map = json.load(open("model_prices_and_context_window.json"))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue