From 2114ac31447d2494e8b2cd6366ecc19e88689910 Mon Sep 17 00:00:00 2001 From: Adil Hafeez Date: Thu, 17 Oct 2024 20:54:06 -0700 Subject: [PATCH] fix a bit more --- crates/llm_gateway/src/llm_stream_context.rs | 1 - crates/prompt_gateway/src/prompt_stream_context.rs | 1 - demos/function_calling/api_server/app/main.py | 5 ++--- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/llm_gateway/src/llm_stream_context.rs b/crates/llm_gateway/src/llm_stream_context.rs index ea6357f3..b48bb7b7 100644 --- a/crates/llm_gateway/src/llm_stream_context.rs +++ b/crates/llm_gateway/src/llm_stream_context.rs @@ -335,7 +335,6 @@ impl HttpContext for LlmGatewayStreamContext { Ok(de) => de, Err(e) => { debug!("invalid response: {}", String::from_utf8_lossy(&body)); - // self.send_server_error(ServerError::Deserialization(e), None); return Action::Continue; } }; diff --git a/crates/prompt_gateway/src/prompt_stream_context.rs b/crates/prompt_gateway/src/prompt_stream_context.rs index 0055ba92..dfa7b7d7 100644 --- a/crates/prompt_gateway/src/prompt_stream_context.rs +++ b/crates/prompt_gateway/src/prompt_stream_context.rs @@ -1279,7 +1279,6 @@ impl HttpContext for PromptStreamContext { Ok(de) => de, Err(e) => { debug!("invalid response: {}, {}", String::from_utf8_lossy(&body), e); - // self.send_server_error(ServerError::Deserialization(e), None); return Action::Continue; } }; diff --git a/demos/function_calling/api_server/app/main.py b/demos/function_calling/api_server/app/main.py index b692ef70..3badbf07 100644 --- a/demos/function_calling/api_server/app/main.py +++ b/demos/function_calling/api_server/app/main.py @@ -1,4 +1,4 @@ -from fastapi import FastAPI, HTTPException +from fastapi import FastAPI import json import random from fastapi import FastAPI, Response @@ -46,8 +46,7 @@ async def weather(req: WeatherRequest, res: Response): } ) - raise HTTPException(status_code=404, detail="some error") - # return weather_forecast + return weather_forecast class InsuranceClaimDetailsRequest(BaseModel):