()
| 88 | #[tokio::test] |
| 89 | #[ignore = "Requires OpenAI API key (set OPENAI_API_KEY environment variable to run)"] |
| 90 | async fn test_agent_creation() { |
| 91 | let _agent_id = AgentId::new(); |
| 92 | let llm_config = LlmConfig::OpenAI { |
| 93 | api_key: std::env::var("OPENAI_API_KEY").unwrap(), |
| 94 | model: "gpt-3.5-turbo".to_string(), |
| 95 | base_url: None, |
| 96 | organization: None, |
| 97 | }; |
| 98 | |
| 99 | let agent = AgentBuilder::new("test_agent", llm_config) |
| 100 | .description("A test agent") |
| 101 | .capabilities(vec![ |
| 102 | AgentCapability::TextProcessing, |
| 103 | AgentCapability::DataAnalysis, |
| 104 | ]) |
| 105 | .build() |
| 106 | .await |
| 107 | .unwrap(); |
| 108 | |
| 109 | assert_eq!(agent.config().name, "test_agent"); |
| 110 | assert_eq!(agent.config().description, "A test agent"); |
| 111 | assert!(agent.has_capability(&AgentCapability::TextProcessing)); |
| 112 | assert!(agent.has_capability(&AgentCapability::DataAnalysis)); |
| 113 | } |
| 114 | |
| 115 | #[tokio::test] |
| 116 | #[ignore = "Requires OpenAI API key (set OPENAI_API_KEY environment variable to run)"] |
nothing calls this directly
no test coverage detected