File tree Expand file tree Collapse file tree 6 files changed +588
-5
lines changed Expand file tree Collapse file tree 6 files changed +588
-5
lines changed Original file line number Diff line number Diff line change
1
+ """Simple test agent for CLI testing.
2
+
3
+ run:
4
+
5
+ uv run ragbits agents run examples.agents.test_cli_agent:test_agent
6
+
7
+ """
8
+
9
+ from ragbits .agents import Agent
10
+ from ragbits .core .llms import LiteLLM
11
+
12
+
13
+ def get_current_weather (location : str ) -> str :
14
+ """
15
+ Get the current weather in a specific location.
16
+
17
+ Args:
18
+ location: The location to get weather for
19
+
20
+ Returns:
21
+ Weather information for the location
22
+ """
23
+ # Mock weather data
24
+ weather_data = {
25
+ "London" : "Rainy, 15°C" ,
26
+ "Paris" : "Sunny, 22°C" ,
27
+ "New York" : "Cloudy, 18°C" ,
28
+ "Tokyo" : "Sunny, 25°C" ,
29
+ }
30
+
31
+ return weather_data .get (location , f"Weather data not available for { location } " )
32
+
33
+
34
+ # Create a simple test agent
35
+ llm = LiteLLM (model_name = "gpt-3.5-turbo" )
36
+
37
+ test_agent = Agent (
38
+ llm = llm ,
39
+ prompt = "You are a helpful assistant that can help with weather information and general questions." ,
40
+ tools = [get_current_weather ],
41
+ keep_history = True ,
42
+ )
Original file line number Diff line number Diff line change 1
1
# CHANGELOG
2
2
3
3
## Unreleased
4
+ - Add Chat with agents in CLI
4
5
- Add tool_choice parameter to agent interface (#738 )
5
6
- Add PydanticAI agents support (#755 )
6
7
- Add unique ID to each agent instance for better tracking and identification (#790 )
Original file line number Diff line number Diff line change @@ -45,6 +45,9 @@ mcp = [
45
45
openai = [
46
46
" openai>=1.91.0,<2.0.0" ,
47
47
]
48
+ cli = [
49
+ " textual>=0.85.2,<1.0.0" ,
50
+ ]
48
51
49
52
[project .urls ]
50
53
"Homepage" = " https://github.com/deepsense-ai/ragbits"
You can’t perform that action at this time.
0 commit comments