ragaai-catalyst 2.0.7.2b1__py3-none-any.whl → 2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. ragaai_catalyst/dataset.py +0 -3
  2. ragaai_catalyst/evaluation.py +1 -2
  3. ragaai_catalyst/tracers/__init__.py +1 -1
  4. ragaai_catalyst/tracers/agentic_tracing/agent_tracer.py +231 -74
  5. ragaai_catalyst/tracers/agentic_tracing/agentic_tracing.py +32 -42
  6. ragaai_catalyst/tracers/agentic_tracing/base.py +132 -30
  7. ragaai_catalyst/tracers/agentic_tracing/data_structure.py +91 -79
  8. ragaai_catalyst/tracers/agentic_tracing/examples/FinancialAnalysisSystem.ipynb +536 -0
  9. ragaai_catalyst/tracers/agentic_tracing/examples/GameActivityEventPlanner.ipynb +134 -0
  10. ragaai_catalyst/tracers/agentic_tracing/examples/TravelPlanner.ipynb +563 -0
  11. ragaai_catalyst/tracers/agentic_tracing/file_name_tracker.py +46 -0
  12. ragaai_catalyst/tracers/agentic_tracing/llm_tracer.py +262 -356
  13. ragaai_catalyst/tracers/agentic_tracing/tool_tracer.py +31 -19
  14. ragaai_catalyst/tracers/agentic_tracing/unique_decorator.py +61 -117
  15. ragaai_catalyst/tracers/agentic_tracing/upload_agentic_traces.py +187 -0
  16. ragaai_catalyst/tracers/agentic_tracing/upload_code.py +115 -0
  17. ragaai_catalyst/tracers/agentic_tracing/user_interaction_tracer.py +35 -59
  18. ragaai_catalyst/tracers/agentic_tracing/utils/llm_utils.py +0 -4
  19. ragaai_catalyst/tracers/agentic_tracing/utils/model_costs.json +2201 -324
  20. ragaai_catalyst/tracers/agentic_tracing/zip_list_of_unique_files.py +186 -0
  21. ragaai_catalyst/tracers/exporters/raga_exporter.py +1 -7
  22. ragaai_catalyst/tracers/llamaindex_callback.py +56 -60
  23. ragaai_catalyst/tracers/tracer.py +6 -2
  24. ragaai_catalyst/tracers/upload_traces.py +46 -57
  25. {ragaai_catalyst-2.0.7.2b1.dist-info → ragaai_catalyst-2.1.dist-info}/METADATA +8 -4
  26. {ragaai_catalyst-2.0.7.2b1.dist-info → ragaai_catalyst-2.1.dist-info}/RECORD +28 -22
  27. {ragaai_catalyst-2.0.7.2b1.dist-info → ragaai_catalyst-2.1.dist-info}/WHEEL +1 -1
  28. ragaai_catalyst/tracers/agentic_tracing/Untitled-1.json +0 -660
  29. {ragaai_catalyst-2.0.7.2b1.dist-info → ragaai_catalyst-2.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,134 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "id": "b4bb06bd",
6
+ "metadata": {},
7
+ "source": [
8
+ "\n",
9
+ "# Game Activity Event Planner\n",
10
+ "\n",
11
+ "This notebook demonstrates AgentNeo's ability to:\n",
12
+ "1. Search for locations where badminton is played.\n",
13
+ "2. Find nearby locations based on user input.\n",
14
+ "3. Filter locations based on weekends and specific time slots (6-8 PM).\n",
15
+ "4. Book 2 courts for singles or doubles matches.\n",
16
+ "\n",
17
+ "### Use Case\n",
18
+ "A group of 6 players wants to book 2 courts to play badminton during the weekend (6-8 PM). This notebook tests the AgentNeo application for its planning functionality.\n"
19
+ ]
20
+ },
21
+ {
22
+ "cell_type": "code",
23
+ "execution_count": null,
24
+ "id": "6e6913d5",
25
+ "metadata": {},
26
+ "outputs": [],
27
+ "source": [
28
+ "\n",
29
+ "# Install necessary packages\n",
30
+ "!pip install agentneo\n",
31
+ "\n",
32
+ "# Import required libraries\n",
33
+ "from agentneo import Planner, LocationFinder, CourtBooking\n",
34
+ "import datetime\n"
35
+ ]
36
+ },
37
+ {
38
+ "cell_type": "code",
39
+ "execution_count": null,
40
+ "id": "221625df",
41
+ "metadata": {},
42
+ "outputs": [],
43
+ "source": [
44
+ "\n",
45
+ "# Define user input and search parameters\n",
46
+ "\n",
47
+ "# User's current location (latitude, longitude)\n",
48
+ "user_location = {\"latitude\": 37.7749, \"longitude\": -122.4194} # Example: San Francisco\n",
49
+ "\n",
50
+ "# Time and date filtering for the weekend\n",
51
+ "today = datetime.date.today()\n",
52
+ "weekend_days = [today + datetime.timedelta(days=(5 - today.weekday()) % 7 + i) for i in range(2)]\n",
53
+ "\n",
54
+ "time_slot = {\"start\": \"18:00\", \"end\": \"20:00\"} # 6-8 PM\n",
55
+ "\n",
56
+ "# Number of players and courts required\n",
57
+ "num_players = 6\n",
58
+ "num_courts = 2\n",
59
+ "\n",
60
+ "print(\"Search Parameters Defined:\")\n",
61
+ "print(f\"User Location: {user_location}\")\n",
62
+ "print(f\"Weekend Days: {weekend_days}\")\n",
63
+ "print(f\"Time Slot: {time_slot}\")\n",
64
+ "print(f\"Players: {num_players}, Courts: {num_courts}\")\n"
65
+ ]
66
+ },
67
+ {
68
+ "cell_type": "code",
69
+ "execution_count": null,
70
+ "id": "a38c6e7d",
71
+ "metadata": {},
72
+ "outputs": [],
73
+ "source": [
74
+ "\n",
75
+ "# Find locations where badminton is played\n",
76
+ "location_finder = LocationFinder()\n",
77
+ "\n",
78
+ "# Search for badminton locations nearby\n",
79
+ "badminton_locations = location_finder.find_locations(activity=\"badminton\", \n",
80
+ " user_location=user_location, \n",
81
+ " max_distance=10) # Within 10 km\n",
82
+ "\n",
83
+ "print(\"Available Badminton Locations Found:\")\n",
84
+ "for loc in badminton_locations:\n",
85
+ " print(loc)\n"
86
+ ]
87
+ },
88
+ {
89
+ "cell_type": "code",
90
+ "execution_count": null,
91
+ "id": "6fdadfd7",
92
+ "metadata": {},
93
+ "outputs": [],
94
+ "source": [
95
+ "\n",
96
+ "# Filter locations for weekends and the specified time slot\n",
97
+ "available_locations = []\n",
98
+ "\n",
99
+ "for loc in badminton_locations:\n",
100
+ " if location_finder.is_available(location=loc, days=weekend_days, time_slot=time_slot):\n",
101
+ " available_locations.append(loc)\n",
102
+ "\n",
103
+ "print(\"Filtered Locations for Weekends and 6-8 PM:\")\n",
104
+ "for loc in available_locations:\n",
105
+ " print(loc)\n"
106
+ ]
107
+ },
108
+ {
109
+ "cell_type": "code",
110
+ "execution_count": null,
111
+ "id": "19775831",
112
+ "metadata": {},
113
+ "outputs": [],
114
+ "source": [
115
+ "\n",
116
+ "# Book 2 courts for singles or doubles matches\n",
117
+ "court_booking = CourtBooking()\n",
118
+ "\n",
119
+ "if available_locations:\n",
120
+ " booking_details = court_booking.book_courts(location=available_locations[0], \n",
121
+ " num_courts=num_courts, \n",
122
+ " players=num_players, \n",
123
+ " time_slot=time_slot)\n",
124
+ " print(\"Court Booking Details:\")\n",
125
+ " print(booking_details)\n",
126
+ "else:\n",
127
+ " print(\"No suitable locations found for booking.\")\n"
128
+ ]
129
+ }
130
+ ],
131
+ "metadata": {},
132
+ "nbformat": 4,
133
+ "nbformat_minor": 5
134
+ }