mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
Litellm Minor Fixes & Improvements (10/03/2024) (#6049)
* fix(proxy_server.py): remove spendlog fixes from proxy startup logic Moves https://github.com/BerriAI/litellm/pull/4794 to `/db_scripts` and cleans up some caching-related debug info (easier to trace debug logs) * fix(langfuse_endpoints.py): Fixes https://github.com/BerriAI/litellm/issues/6041 * fix(azure.py): fix health checks for azure audio transcription models Fixes https://github.com/BerriAI/litellm/issues/5999 * Feat: Add Literal AI Integration (#5653) * feat: add Literal AI integration * update readme * Update README.md * fix: address comments * fix: remove literalai sdk * fix: use HTTPHandler * chore: add test * fix: add asyncio lock * fix(literal_ai.py): fix linting errors * fix(literal_ai.py): fix linting errors * refactor: cleanup --------- Co-authored-by: Willy Douhard <willy.douhard@gmail.com>
This commit is contained in:
parent
f9d0bcc5a1
commit
5c33d1c9af
14 changed files with 557 additions and 44 deletions
|
@ -2360,34 +2360,6 @@ class PrismaClient:
|
|||
)
|
||||
raise e
|
||||
|
||||
async def apply_db_fixes(self):
|
||||
try:
|
||||
verbose_proxy_logger.debug(
|
||||
"Applying LiteLLM - DB Fixes fixing logs in SpendLogs"
|
||||
)
|
||||
sql_query = """
|
||||
UPDATE "LiteLLM_SpendLogs"
|
||||
SET team_id = (
|
||||
SELECT vt.team_id
|
||||
FROM "LiteLLM_VerificationToken" vt
|
||||
WHERE vt.token = "LiteLLM_SpendLogs".api_key
|
||||
)
|
||||
WHERE team_id IS NULL
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM "LiteLLM_VerificationToken" vt
|
||||
WHERE vt.token = "LiteLLM_SpendLogs".api_key
|
||||
);
|
||||
"""
|
||||
response = await self.db.query_raw(sql_query)
|
||||
verbose_proxy_logger.debug(
|
||||
"Applied LiteLLM - DB Fixes fixing logs in SpendLogs, Response=%s",
|
||||
response,
|
||||
)
|
||||
except Exception as e:
|
||||
verbose_proxy_logger.debug(f"Error apply_db_fixes: {str(e)}")
|
||||
return
|
||||
|
||||
|
||||
### CUSTOM FILE ###
|
||||
def get_instance_fn(value: str, config_file_path: Optional[str] = None) -> Any:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue