The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
test: update testing
Krrish Dholakia81841242172d
diff --git a/tests/local_testing/test_amazing_vertex_completion.py b/tests/local_testing/test_amazing_vertex_completion.pyindex f3c8e32dc14..97528132c91 100644--- a/tests/local_testing/test_amazing_vertex_completion.py+++ b/tests/local_testing/test_amazing_vertex_completion.py@@ -147,7 +147,7 @@ async def test_get_response():prompt = '\ndef count_nums(arr):\n """\n Write a function count_nums which takes an array of integers and returns\n the number of elements which has a sum of digits > 0.\n If a number is negative, then its first signed digit will be negative:\n e.g. -123 has signed digits -1, 2, and 3.\n >>> count_nums([]) == 0\n >>> count_nums([-1, 11, -11]) == 1\n >>> count_nums([1, 1, 2]) == 3\n """\n'try:response = await acompletion(- model="gemini-pro",+ model="gemini-1.5-flash",messages=[{"role": "system",@@ -1844,57 +1844,6 @@ async def test_gemini_pro_function_calling_streaming(sync_mode):pass[email protected](retries=3, delay=1)-async def test_gemini_pro_async_function_calling():- load_vertex_ai_credentials()- litellm.set_verbose = True- try:- tools = [- {- "type": "function",- "function": {- "name": "get_current_weather",- "description": "Get the current weather in a given location.",- "parameters": {- "type": "object",- "properties": {- "location": {- "type": "string",- "description": "The city and state, e.g. San Francisco, CA",- },- "unit": {- "type": "string",- "enum": ["celsius", "fahrenheit"],- },- },- "required": ["location"],- },- },- }- ]- messages = [- {- "role": "user",- "content": "What's the weather like in Boston today in fahrenheit?",- }- ]- completion = await litellm.acompletion(- model="gemini-pro", messages=messages, tools=tools, tool_choice="auto"- )- print(f"completion: {completion}")- print(f"message content: {completion.choices[0].message.content}")- assert completion.choices[0].message.content is None- assert len(completion.choices[0].message.tool_calls) == 1-- # except litellm.APIError as e:- # pass- except litellm.RateLimitError as e:- pass- except Exception as e:- pytest.fail(f"An exception occurred - {str(e)}")- # raise Exception("it worked!")-# asyncio.run(gemini_pro_async_function_calling())