From 6c6c62f032aa5f0f277775bc96f9942d268b3a1e Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Tue, 16 Jan 2024 12:24:40 -0800 Subject: [PATCH] (temp) ssl_verify=False for dynamo --- litellm/proxy/db/dynamo_db.py | 10 ++++++---- litellm/proxy/proxy_config.yaml | 12 ++++++++++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/litellm/proxy/db/dynamo_db.py b/litellm/proxy/db/dynamo_db.py index a5c4b8371f3..fdc9ccfba1a 100644 --- a/litellm/proxy/db/dynamo_db.py +++ b/litellm/proxy/db/dynamo_db.py @@ -10,6 +10,7 @@ from typing import Any, List, Literal, Optional, Union import json from datetime import datetime from litellm._logging import verbose_proxy_logger +import aiohttp class DynamoDBWrapper(CustomDB): @@ -71,9 +72,10 @@ class DynamoDBWrapper(CustomDB): from aiodynamo.models import ReturnValues from aiodynamo.http.aiohttp import AIOHTTP from aiohttp import ClientSession + import aiohttp verbose_proxy_logger.debug("DynamoDB Wrapper - Attempting to connect") - async with ClientSession() as session: + async with ClientSession(connector=aiohttp.TCPConnector(ssl=False)) as session: client = Client(AIOHTTP(session), Credentials.auto(), self.region_name) ## User try: @@ -146,7 +148,7 @@ class DynamoDBWrapper(CustomDB): from aiodynamo.http.aiohttp import AIOHTTP from aiohttp import ClientSession - async with ClientSession() as session: + async with ClientSession(connector=aiohttp.TCPConnector(ssl=False)) as session: client = Client(AIOHTTP(session), Credentials.auto(), self.region_name) table = None if table_name == "user": @@ -179,7 +181,7 @@ class DynamoDBWrapper(CustomDB): from aiodynamo.http.aiohttp import AIOHTTP from aiohttp import ClientSession - async with ClientSession() as session: + async with ClientSession(connector=aiohttp.TCPConnector(ssl=False)) as session: client = Client(AIOHTTP(session), Credentials.auto(), self.region_name) table = None key_name = None @@ -233,7 +235,7 @@ class DynamoDBWrapper(CustomDB): from aiodynamo.http.aiohttp import AIOHTTP from aiohttp import ClientSession - async with ClientSession() as session: + async with ClientSession(connector=aiohttp.TCPConnector(ssl=False)) as session: client = Client(AIOHTTP(session), Credentials.auto(), self.region_name) table = None key_name = None diff --git a/litellm/proxy/proxy_config.yaml b/litellm/proxy/proxy_config.yaml index 2699e9d9c9e..1216b68dcaa 100644 --- a/litellm/proxy/proxy_config.yaml +++ b/litellm/proxy/proxy_config.yaml @@ -45,13 +45,21 @@ model_list: model_info: mode: embedding litellm_settings: - post_call_rules: post_call_rules.post_response_rule fallbacks: [{"openai-gpt-3.5": ["azure-gpt-3.5"]}] # cache: True # setting callback class # callbacks: custom_callbacks.proxy_handler_instance # sets litellm.callbacks = [proxy_handler_instance] -# general_settings: +general_settings: + master_key: sk-1234 + database_type: "dynamo_db" + database_args: { # 👈 all args - https://github.com/BerriAI/litellm/blob/befbcbb7ac8f59835ce47415c128decf37aac328/litellm/proxy/_types.py#L190 + "billing_mode": "PAY_PER_REQUEST", + "region_name": "us-west-2" + } + + + environment_variables: # otel: True # OpenTelemetry Logger