Skip to content

Commit

Permalink
🐛 Fix chat validation about new chatgpt
Browse files Browse the repository at this point in the history
  • Loading branch information
luoshuijs committed Mar 27, 2024
1 parent 94cc8dc commit 5848c3e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions crates/openai/src/serve/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,18 +511,22 @@ async fn check_wan_address() {
}
}


async fn arkos_static(path: Path<String>) -> Result<Response<Body>, ResponseError> {
let client = with_context!(api_client);
let data = client
.get(format!("{}/v2/{}", arkose::Type::GPT4.origin_url(), path.0.as_str()))
.get(format!(
"{}/v2/{}",
arkose::Type::GPT4.origin_url(),
path.0.as_str()
))
.send()
.await?;
let mut builder = Response::builder()
.status(data.status());
let mut builder = Response::builder().status(data.status());
for (key, value) in data.headers().iter() {
builder = builder.header(key, value);
}
let content = data.bytes().await?;
builder.body(content.into()).map_err(ResponseError::InternalServerError)
builder
.body(content.into())
.map_err(ResponseError::InternalServerError)
}

0 comments on commit 5848c3e

Please sign in to comment.