mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
fix consts and tests
This commit is contained in:
parent
a86ffd3f49
commit
52a5fa2456
6 changed files with 6 additions and 18 deletions
|
|
@ -186,15 +186,6 @@ async fn handle_agent_chat(
|
|||
|
||||
let message: Vec<OpenAIMessage> = client_request.get_messages();
|
||||
|
||||
// let chat_completions_request: ChatCompletionsRequest =
|
||||
// serde_json::from_slice(&chat_request_bytes).map_err(|err| {
|
||||
// warn!(
|
||||
// "Failed to parse request body as ChatCompletionsRequest: {}",
|
||||
// err
|
||||
// );
|
||||
// AgentFilterChainError::RequestParsing(err)
|
||||
// })?;
|
||||
|
||||
// Extract trace parent for routing
|
||||
let trace_parent = request_headers
|
||||
.iter()
|
||||
|
|
@ -263,7 +254,7 @@ async fn handle_agent_chat(
|
|||
|
||||
for (agent_index, selected_agent) in selected_agents.iter().enumerate() {
|
||||
let is_last_agent = agent_index == agent_count - 1;
|
||||
|
||||
|
||||
debug!(
|
||||
"Processing agent {}/{}: {}",
|
||||
agent_index + 1,
|
||||
|
|
@ -351,7 +342,7 @@ async fn handle_agent_chat(
|
|||
// For intermediate agents, collect the full response and pass to next agent
|
||||
debug!("Collecting response from intermediate agent: {}", agent_name);
|
||||
let response_text = response_handler.collect_full_response(llm_response).await?;
|
||||
|
||||
|
||||
// Create a new message with the agent's response as assistant message
|
||||
// and add it to the conversation history
|
||||
current_messages.push(OpenAIMessage {
|
||||
|
|
|
|||
|
|
@ -176,7 +176,6 @@ mod tests {
|
|||
|
||||
fn create_test_orchestrator_service() -> Arc<OrchestratorService> {
|
||||
Arc::new(OrchestratorService::new(
|
||||
vec![], // empty providers for testing
|
||||
"http://localhost:8080".to_string(),
|
||||
"test-model".to_string(),
|
||||
"test-provider".to_string(),
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ mod integration_tests {
|
|||
|
||||
fn create_test_orchestrator_service() -> Arc<OrchestratorService> {
|
||||
Arc::new(OrchestratorService::new(
|
||||
vec![], // empty providers for testing
|
||||
"http://localhost:8080".to_string(),
|
||||
"test-model".to_string(),
|
||||
"test-provider".to_string(),
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use brightstaff::state::memory::MemoryConversationalStorage;
|
|||
use brightstaff::utils::tracing::init_tracer;
|
||||
use bytes::Bytes;
|
||||
use common::configuration::{Agent, Configuration};
|
||||
use common::consts::{CHAT_COMPLETIONS_PATH, MESSAGES_PATH, OPENAI_RESPONSES_API_PATH};
|
||||
use common::consts::{CHAT_COMPLETIONS_PATH, MESSAGES_PATH, OPENAI_RESPONSES_API_PATH, PLANO_ORCHESTRATOR_MODEL_NAME};
|
||||
use common::traces::TraceCollector;
|
||||
use http_body_util::{combinators::BoxBody, BodyExt, Empty};
|
||||
use hyper::body::Incoming;
|
||||
|
|
@ -101,9 +101,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
|||
));
|
||||
|
||||
let orchestrator_service: Arc<OrchestratorService> = Arc::new(OrchestratorService::new(
|
||||
arch_config.model_providers.clone(),
|
||||
llm_provider_url.clone() + CHAT_COMPLETIONS_PATH,
|
||||
"Plano-Orchestrator".to_string(),
|
||||
PLANO_ORCHESTRATOR_MODEL_NAME.to_string(),
|
||||
routing_llm_provider,
|
||||
));
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use std::{collections::HashMap, sync::Arc};
|
||||
|
||||
use common::{
|
||||
configuration::{LlmProvider, AgentUsagePreference, OrchestrationPreference},
|
||||
configuration::{AgentUsagePreference, OrchestrationPreference},
|
||||
consts::ARCH_PROVIDER_HINT_HEADER,
|
||||
};
|
||||
use hermesllm::apis::openai::{ChatCompletionsResponse, Message};
|
||||
|
|
@ -36,7 +36,6 @@ pub type Result<T> = std::result::Result<T, OrchestrationError>;
|
|||
|
||||
impl OrchestratorService {
|
||||
pub fn new(
|
||||
_providers: Vec<LlmProvider>,
|
||||
orchestrator_url: String,
|
||||
orchestration_model_name: String,
|
||||
orchestration_provider_name: String,
|
||||
|
|
|
|||
|
|
@ -33,3 +33,4 @@ pub const OTEL_POST_PATH: &str = "/v1/traces";
|
|||
pub const LLM_ROUTE_HEADER: &str = "x-arch-llm-route";
|
||||
pub const ENVOY_RETRY_HEADER: &str = "x-envoy-max-retries";
|
||||
pub const BRIGHT_STAFF_SERVICE_NAME : &str = "brightstaff";
|
||||
pub const PLANO_ORCHESTRATOR_MODEL_NAME: &str = "Plano-Orchestrator";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue