Test whether the combined configs work as expected.
(test_settings: lr.utils.configuration.Settings)
| 14 | |
| 15 | |
| 16 | def test_agent(test_settings: lr.utils.configuration.Settings): |
| 17 | """ |
| 18 | Test whether the combined configs work as expected. |
| 19 | """ |
| 20 | lr.utils.configuration.set_global(test_settings) |
| 21 | agent_config = CustomAgentConfig() |
| 22 | agent = lr.Agent(agent_config) |
| 23 | response = agent.llm_response( |
| 24 | "what is the capital of France?" |
| 25 | ) # direct LLM question |
| 26 | assert "Paris" in response.content |
| 27 | |
| 28 | with lr.language_models.base.StreamingIfAllowed(agent.llm, False): |
| 29 | response = agent.llm_response("what is the capital of France?") |
| 30 | assert "Paris" in response.content |
| 31 | |
| 32 | |
| 33 | @pytest.mark.asyncio |
nothing calls this directly
no test coverage detected
searching dependent graphs…