mirror of
https://github.com/katanemo/plano.git
synced 2026-07-14 16:22:12 +02:00
revert prompt_gateway changes
This commit is contained in:
parent
125af57837
commit
95486db92a
2 changed files with 6 additions and 9 deletions
|
|
@ -205,8 +205,7 @@ impl HttpContext for StreamContext {
|
||||||
info!("on_http_request_body: sending request to model server");
|
info!("on_http_request_body: sending request to model server");
|
||||||
debug!("request body: {}", json_data);
|
debug!("request body: {}", json_data);
|
||||||
|
|
||||||
let timeout_ms = MODEL_SERVER_REQUEST_TIMEOUT_MS;
|
let timeout_str = MODEL_SERVER_REQUEST_TIMEOUT_MS.to_string();
|
||||||
let timeout_str = timeout_ms.to_string();
|
|
||||||
|
|
||||||
let mut headers = vec![
|
let mut headers = vec![
|
||||||
(ARCH_UPSTREAM_HOST_HEADER, MODEL_SERVER_NAME),
|
(ARCH_UPSTREAM_HOST_HEADER, MODEL_SERVER_NAME),
|
||||||
|
|
@ -231,7 +230,7 @@ impl HttpContext for StreamContext {
|
||||||
headers,
|
headers,
|
||||||
Some(json_data.as_bytes()),
|
Some(json_data.as_bytes()),
|
||||||
vec![],
|
vec![],
|
||||||
Duration::from_millis(timeout_ms),
|
Duration::from_secs(5),
|
||||||
);
|
);
|
||||||
|
|
||||||
if let Some(content) = self.user_prompt.as_ref().unwrap().content.as_ref() {
|
if let Some(content) = self.user_prompt.as_ref().unwrap().content.as_ref() {
|
||||||
|
|
|
||||||
|
|
@ -171,8 +171,7 @@ impl StreamContext {
|
||||||
callout_context.request_body.messages.clone(),
|
callout_context.request_body.messages.clone(),
|
||||||
);
|
);
|
||||||
let arch_messages_json = serde_json::to_string(¶ms).unwrap();
|
let arch_messages_json = serde_json::to_string(¶ms).unwrap();
|
||||||
let timeout_ms = DEFAULT_TARGET_REQUEST_TIMEOUT_MS;
|
let timeout_str = DEFAULT_TARGET_REQUEST_TIMEOUT_MS.to_string();
|
||||||
let timeout_str = timeout_ms.to_string();
|
|
||||||
|
|
||||||
let mut headers = vec![
|
let mut headers = vec![
|
||||||
(":method", "POST"),
|
(":method", "POST"),
|
||||||
|
|
@ -194,7 +193,7 @@ impl StreamContext {
|
||||||
headers,
|
headers,
|
||||||
Some(arch_messages_json.as_bytes()),
|
Some(arch_messages_json.as_bytes()),
|
||||||
vec![],
|
vec![],
|
||||||
Duration::from_millis(timeout_ms),
|
Duration::from_secs(5),
|
||||||
);
|
);
|
||||||
callout_context.response_handler_type = ResponseHandlerType::DefaultTarget;
|
callout_context.response_handler_type = ResponseHandlerType::DefaultTarget;
|
||||||
callout_context.prompt_target_name = Some(default_prompt_target.name.clone());
|
callout_context.prompt_target_name = Some(default_prompt_target.name.clone());
|
||||||
|
|
@ -423,8 +422,7 @@ impl StreamContext {
|
||||||
|
|
||||||
debug!("on_http_call_response: api call body {:?}", api_call_body);
|
debug!("on_http_call_response: api call body {:?}", api_call_body);
|
||||||
|
|
||||||
let timeout_ms = API_REQUEST_TIMEOUT_MS;
|
let timeout_str = API_REQUEST_TIMEOUT_MS.to_string();
|
||||||
let timeout_str = timeout_ms.to_string();
|
|
||||||
|
|
||||||
let http_method_str = http_method.to_string();
|
let http_method_str = http_method.to_string();
|
||||||
let mut headers: HashMap<_, _> = [
|
let mut headers: HashMap<_, _> = [
|
||||||
|
|
@ -459,7 +457,7 @@ impl StreamContext {
|
||||||
headers.into_iter().collect(),
|
headers.into_iter().collect(),
|
||||||
api_call_body.as_deref().map(|s| s.as_bytes()),
|
api_call_body.as_deref().map(|s| s.as_bytes()),
|
||||||
vec![],
|
vec![],
|
||||||
Duration::from_millis(timeout_ms),
|
Duration::from_secs(5),
|
||||||
);
|
);
|
||||||
|
|
||||||
info!(
|
info!(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue