agenta 0.12.7__py3-none-any.whl → 0.13.0a0__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.
Potentially problematic release.
This version of agenta might be problematic. Click here for more details.
- agenta/__init__.py +3 -2
- agenta/cli/helper.py +1 -1
- agenta/cli/main.py +1 -1
- agenta/cli/variant_commands.py +7 -5
- agenta/client/api.py +1 -1
- agenta/client/backend/__init__.py +78 -18
- agenta/client/backend/client.py +961 -5575
- agenta/client/backend/core/api_error.py +1 -3
- agenta/client/backend/core/datetime_utils.py +1 -3
- agenta/client/backend/core/jsonable_encoder.py +3 -9
- agenta/client/backend/resources/__init__.py +20 -0
- agenta/client/backend/resources/apps/__init__.py +2 -0
- agenta/client/backend/resources/apps/client.py +915 -0
- agenta/client/backend/resources/bases/__init__.py +2 -0
- agenta/client/backend/resources/bases/client.py +121 -0
- agenta/client/backend/resources/configs/__init__.py +2 -0
- agenta/client/backend/resources/configs/client.py +333 -0
- agenta/client/backend/resources/containers/__init__.py +5 -0
- agenta/client/backend/resources/containers/client.py +351 -0
- agenta/client/backend/resources/containers/types/__init__.py +5 -0
- agenta/client/backend/{types → resources/containers/types}/container_templates_response.py +1 -1
- agenta/client/backend/resources/environments/__init__.py +2 -0
- agenta/client/backend/resources/environments/client.py +119 -0
- agenta/client/backend/resources/evaluations/__init__.py +2 -0
- agenta/client/backend/resources/evaluations/client.py +948 -0
- agenta/client/backend/resources/evaluators/__init__.py +2 -0
- agenta/client/backend/resources/evaluators/client.py +554 -0
- agenta/client/backend/resources/observability/__init__.py +2 -0
- agenta/client/backend/resources/observability/client.py +1114 -0
- agenta/client/backend/resources/testsets/__init__.py +2 -0
- agenta/client/backend/resources/testsets/client.py +649 -0
- agenta/client/backend/resources/variants/__init__.py +5 -0
- agenta/client/backend/resources/variants/client.py +730 -0
- agenta/client/backend/resources/variants/types/__init__.py +5 -0
- agenta/client/backend/resources/variants/types/add_variant_from_base_and_config_response.py +7 -0
- agenta/client/backend/types/__init__.py +54 -22
- agenta/client/backend/types/aggregated_result.py +4 -12
- agenta/client/backend/types/aggregated_result_evaluator_config.py +7 -0
- agenta/client/backend/types/app.py +2 -10
- agenta/client/backend/types/{app_variant_output.py → app_variant_response.py} +6 -12
- agenta/client/backend/types/app_variant_revision.py +2 -10
- agenta/client/backend/types/base_output.py +2 -10
- agenta/client/backend/types/body_import_testset.py +2 -10
- agenta/client/backend/types/config_db.py +2 -10
- agenta/client/backend/types/create_app_output.py +2 -10
- agenta/client/backend/types/{trace.py → create_span.py} +21 -20
- agenta/client/backend/types/{delete_evaluation.py → create_trace_response.py} +5 -12
- agenta/client/backend/types/docker_env_vars.py +2 -10
- agenta/client/backend/types/environment_output.py +5 -11
- agenta/client/backend/types/environment_output_extended.py +37 -0
- agenta/client/backend/types/environment_revision.py +33 -0
- agenta/client/backend/types/error.py +29 -0
- agenta/client/backend/types/evaluation.py +8 -13
- agenta/client/backend/types/evaluation_scenario.py +2 -10
- agenta/client/backend/types/evaluation_scenario_input.py +2 -10
- agenta/client/backend/types/evaluation_scenario_output.py +6 -12
- agenta/client/backend/types/evaluation_scenario_result.py +2 -10
- agenta/client/backend/types/evaluation_scenario_score_update.py +28 -0
- agenta/client/backend/types/evaluation_status_enum.py +4 -0
- agenta/client/backend/types/evaluation_type.py +1 -3
- agenta/client/backend/types/evaluation_webhook.py +2 -10
- agenta/client/backend/types/evaluator.py +3 -10
- agenta/client/backend/types/evaluator_config.py +2 -10
- agenta/client/backend/types/feedback.py +2 -10
- agenta/client/backend/types/{get_config_reponse.py → get_config_response.py} +4 -12
- agenta/client/backend/types/http_validation_error.py +2 -10
- agenta/client/backend/types/human_evaluation.py +2 -10
- agenta/client/backend/types/human_evaluation_scenario.py +4 -12
- agenta/client/backend/types/human_evaluation_scenario_input.py +2 -10
- agenta/client/backend/types/human_evaluation_scenario_output.py +2 -10
- agenta/client/backend/types/human_evaluation_scenario_update.py +37 -0
- agenta/client/backend/types/human_evaluation_update.py +29 -0
- agenta/client/backend/types/image.py +3 -10
- agenta/client/backend/types/invite_request.py +3 -10
- agenta/client/backend/types/{list_api_keys_output.py → list_api_keys_response.py} +3 -11
- agenta/client/backend/types/llm_run_rate_limit.py +2 -10
- agenta/client/backend/types/llm_tokens.py +30 -0
- agenta/client/backend/types/new_human_evaluation.py +34 -0
- agenta/client/backend/types/new_testset.py +2 -10
- agenta/client/backend/types/organization.py +3 -10
- agenta/client/backend/types/organization_output.py +2 -10
- agenta/client/backend/types/permission.py +141 -0
- agenta/client/backend/types/result.py +4 -10
- agenta/client/backend/types/{human_evaluation_scenario_score.py → score.py} +1 -1
- agenta/client/backend/types/simple_evaluation_output.py +2 -10
- agenta/client/backend/types/span.py +20 -26
- agenta/client/backend/types/span_detail.py +44 -0
- agenta/client/backend/types/span_kind.py +49 -0
- agenta/client/backend/types/span_status_code.py +29 -0
- agenta/client/backend/types/span_variant.py +30 -0
- agenta/client/backend/types/template.py +2 -10
- agenta/client/backend/types/template_image_info.py +2 -10
- agenta/client/backend/types/test_set_output_response.py +2 -10
- agenta/client/backend/types/test_set_simple_response.py +2 -10
- agenta/client/backend/types/trace_detail.py +44 -0
- agenta/client/backend/types/uri.py +2 -10
- agenta/client/backend/types/validation_error.py +2 -10
- agenta/client/backend/types/variant_action.py +2 -10
- agenta/client/backend/types/variant_action_enum.py +1 -3
- agenta/client/backend/types/with_pagination.py +32 -0
- agenta/client/backend/types/workspace_member_response.py +30 -0
- agenta/client/backend/types/workspace_permission.py +32 -0
- agenta/client/backend/types/workspace_response.py +36 -0
- agenta/client/backend/types/workspace_role.py +41 -0
- agenta/client/backend/types/workspace_role_response.py +30 -0
- agenta/docker/docker_utils.py +1 -5
- agenta/sdk/__init__.py +3 -2
- agenta/sdk/agenta_decorator.py +68 -26
- agenta/sdk/agenta_init.py +50 -20
- agenta/sdk/tracing/context_manager.py +13 -0
- agenta/sdk/tracing/decorators.py +41 -0
- agenta/sdk/tracing/llm_tracing.py +203 -0
- agenta/sdk/tracing/logger.py +19 -0
- agenta/sdk/tracing/tasks_manager.py +130 -0
- agenta/sdk/types.py +0 -38
- {agenta-0.12.7.dist-info → agenta-0.13.0a0.dist-info}/METADATA +2 -1
- agenta-0.13.0a0.dist-info/RECORD +161 -0
- agenta/client/backend/types/add_variant_from_base_and_config_response.py +0 -7
- agenta/client/backend/types/app_variant_output_extended.py +0 -50
- agenta/client/backend/types/human_evaluation_scenario_update_score.py +0 -5
- agenta-0.12.7.dist-info/RECORD +0 -114
- {agenta-0.12.7.dist-info → agenta-0.13.0a0.dist-info}/WHEEL +0 -0
- {agenta-0.12.7.dist-info → agenta-0.13.0a0.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Stdlib Imports
|
|
2
|
+
import inspect
|
|
3
|
+
from functools import wraps
|
|
4
|
+
|
|
5
|
+
# Own Imports
|
|
6
|
+
import agenta as ag
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def span(type: str):
|
|
10
|
+
"""Decorator to automatically start and end spans."""
|
|
11
|
+
|
|
12
|
+
tracing = ag.llm_tracing()
|
|
13
|
+
|
|
14
|
+
def decorator(func):
|
|
15
|
+
@wraps(func)
|
|
16
|
+
async def wrapper(*args, **kwargs):
|
|
17
|
+
result = None
|
|
18
|
+
span = tracing.start_span(
|
|
19
|
+
name=func.__name__,
|
|
20
|
+
input=kwargs,
|
|
21
|
+
spankind=type,
|
|
22
|
+
)
|
|
23
|
+
try:
|
|
24
|
+
is_coroutine_function = inspect.iscoroutinefunction(func)
|
|
25
|
+
if is_coroutine_function:
|
|
26
|
+
result = await func(*args, **kwargs)
|
|
27
|
+
else:
|
|
28
|
+
result = func(*args, **kwargs)
|
|
29
|
+
tracing.update_span_status(span=span, value="OK")
|
|
30
|
+
except Exception as e:
|
|
31
|
+
result = str(e)
|
|
32
|
+
tracing.update_span_status(span=span, value="ERROR")
|
|
33
|
+
finally:
|
|
34
|
+
if not isinstance(result, dict):
|
|
35
|
+
result = {"message": result}
|
|
36
|
+
tracing.end_span(outputs=result, span=span)
|
|
37
|
+
return result
|
|
38
|
+
|
|
39
|
+
return wrapper
|
|
40
|
+
|
|
41
|
+
return decorator
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# Stdlib Imports
|
|
2
|
+
from datetime import datetime, timezone
|
|
3
|
+
from typing import Optional, Dict, Any, List, Union
|
|
4
|
+
|
|
5
|
+
# Own Imports
|
|
6
|
+
from agenta.sdk.tracing.logger import llm_logger
|
|
7
|
+
from agenta.sdk.tracing.tasks_manager import TaskQueue
|
|
8
|
+
from agenta.client.backend.client import AsyncAgentaApi
|
|
9
|
+
from agenta.client.backend.client import AsyncObservabilityClient
|
|
10
|
+
from agenta.client.backend.types.create_span import CreateSpan, SpanKind, SpanStatusCode
|
|
11
|
+
|
|
12
|
+
# Third Party Imports
|
|
13
|
+
from bson.objectid import ObjectId
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Tracing(object):
|
|
17
|
+
"""Agenta llm tracing object.
|
|
18
|
+
|
|
19
|
+
Args:
|
|
20
|
+
base_url (str): The URL of the backend host
|
|
21
|
+
api_key (str): The API Key of the backend host
|
|
22
|
+
tasks_manager (TaskQueue): The tasks manager dedicated to handling asynchronous tasks
|
|
23
|
+
llm_logger (Logger): The logger associated with the LLM tracing
|
|
24
|
+
max_workers (int): The maximum number of workers to run tracing
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
_instance = None
|
|
28
|
+
|
|
29
|
+
def __new__(cls, *args, **kwargs):
|
|
30
|
+
if not cls._instance:
|
|
31
|
+
cls._instance = super().__new__(cls)
|
|
32
|
+
return cls._instance
|
|
33
|
+
|
|
34
|
+
def __init__(
|
|
35
|
+
self,
|
|
36
|
+
base_url: str,
|
|
37
|
+
app_id: str,
|
|
38
|
+
variant_id: str,
|
|
39
|
+
api_key: Optional[str] = None,
|
|
40
|
+
max_workers: Optional[int] = None,
|
|
41
|
+
):
|
|
42
|
+
self.base_url = base_url + "/api"
|
|
43
|
+
self.api_key = api_key if api_key is not None else ""
|
|
44
|
+
self.llm_logger = llm_logger
|
|
45
|
+
self.app_id = app_id
|
|
46
|
+
self.variant_id = variant_id
|
|
47
|
+
self.tasks_manager = TaskQueue(
|
|
48
|
+
max_workers if max_workers else 4, logger=llm_logger
|
|
49
|
+
)
|
|
50
|
+
self.active_span = CreateSpan
|
|
51
|
+
self.active_trace = CreateSpan
|
|
52
|
+
self.recording_trace_id: Union[str, None] = None
|
|
53
|
+
self.recorded_spans: List[CreateSpan] = []
|
|
54
|
+
self.tags: List[str] = []
|
|
55
|
+
self.span_dict: Dict[str, CreateSpan] = {} # type: ignore
|
|
56
|
+
|
|
57
|
+
@property
|
|
58
|
+
def client(self) -> AsyncObservabilityClient:
|
|
59
|
+
"""Initialize observability async client
|
|
60
|
+
|
|
61
|
+
Returns:
|
|
62
|
+
AsyncObservabilityClient: async client
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
return AsyncAgentaApi(
|
|
66
|
+
base_url=self.base_url, api_key=self.api_key, timeout=120 # type: ignore
|
|
67
|
+
).observability
|
|
68
|
+
|
|
69
|
+
def set_span_attribute(
|
|
70
|
+
self, parent_key: Optional[str] = None, attributes: Dict[str, Any] = {}
|
|
71
|
+
):
|
|
72
|
+
span = self.span_dict[self.active_span.id] # type: ignore
|
|
73
|
+
for key, value in attributes.items():
|
|
74
|
+
self.set_attribute(span.attributes, key, value, parent_key) # type: ignore
|
|
75
|
+
|
|
76
|
+
def set_attribute(
|
|
77
|
+
self,
|
|
78
|
+
span_attributes: Dict[str, Any],
|
|
79
|
+
key: str,
|
|
80
|
+
value: Any,
|
|
81
|
+
parent_key: Optional[str] = None,
|
|
82
|
+
):
|
|
83
|
+
if parent_key is not None:
|
|
84
|
+
model_config = span_attributes.get(parent_key, None)
|
|
85
|
+
if not model_config:
|
|
86
|
+
span_attributes[parent_key] = {}
|
|
87
|
+
span_attributes[parent_key][key] = value
|
|
88
|
+
else:
|
|
89
|
+
span_attributes[key] = value
|
|
90
|
+
|
|
91
|
+
def set_trace_tags(self, tags: List[str]):
|
|
92
|
+
self.tags.extend(tags)
|
|
93
|
+
|
|
94
|
+
def start_parent_span(
|
|
95
|
+
self, name: str, inputs: Dict[str, Any], config: Dict[str, Any]
|
|
96
|
+
):
|
|
97
|
+
trace_id = self._create_trace_id()
|
|
98
|
+
span_id = self._create_span_id()
|
|
99
|
+
self.llm_logger.info("Recording parent span...")
|
|
100
|
+
span = CreateSpan(
|
|
101
|
+
id=span_id,
|
|
102
|
+
app_id=self.app_id,
|
|
103
|
+
variant_id=self.variant_id,
|
|
104
|
+
inputs=inputs,
|
|
105
|
+
name=name,
|
|
106
|
+
config=config,
|
|
107
|
+
spankind=SpanKind.WORKFLOW.value,
|
|
108
|
+
status=SpanStatusCode.UNSET.value,
|
|
109
|
+
start_time=datetime.now(timezone.utc),
|
|
110
|
+
)
|
|
111
|
+
self.active_trace = span
|
|
112
|
+
self.recording_trace_id = trace_id
|
|
113
|
+
self.parent_span_id = span.id
|
|
114
|
+
self.llm_logger.info(f"Recorded active_trace and parent_span_id: {span.id}")
|
|
115
|
+
|
|
116
|
+
def start_span(
|
|
117
|
+
self,
|
|
118
|
+
name: str,
|
|
119
|
+
spankind: str,
|
|
120
|
+
input: Dict[str, Any],
|
|
121
|
+
config: Dict[str, Any] = {},
|
|
122
|
+
) -> CreateSpan:
|
|
123
|
+
span_id = self._create_span_id()
|
|
124
|
+
self.llm_logger.info(f"Recording {spankind} span...")
|
|
125
|
+
span = CreateSpan(
|
|
126
|
+
id=span_id,
|
|
127
|
+
inputs=input,
|
|
128
|
+
name=name,
|
|
129
|
+
config=config,
|
|
130
|
+
parent_span_id=self.parent_span_id,
|
|
131
|
+
spankind=spankind.upper(),
|
|
132
|
+
attributes={},
|
|
133
|
+
status=SpanStatusCode.UNSET.value,
|
|
134
|
+
start_time=datetime.now(timezone.utc),
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
self.active_span = span
|
|
138
|
+
self.span_dict[span.id] = span
|
|
139
|
+
self.parent_span_id = span.id
|
|
140
|
+
self.llm_logger.info(f"Recorded active_span and parent_span_id: {span.id}")
|
|
141
|
+
return span
|
|
142
|
+
|
|
143
|
+
def update_span_status(self, span: CreateSpan, value: str):
|
|
144
|
+
updated_span = CreateSpan(**{**span.dict(), "status": value})
|
|
145
|
+
self.active_span = updated_span
|
|
146
|
+
|
|
147
|
+
def end_span(self, outputs: Dict[str, Any], span: CreateSpan, **kwargs):
|
|
148
|
+
updated_span = CreateSpan(
|
|
149
|
+
**span.dict(),
|
|
150
|
+
end_time=datetime.now(timezone.utc),
|
|
151
|
+
outputs=[outputs["message"]],
|
|
152
|
+
cost=outputs.get("cost", None),
|
|
153
|
+
environment=kwargs.get("environment"),
|
|
154
|
+
tokens=outputs.get("usage"),
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
# Push span to list of recorded spans
|
|
158
|
+
self.recorded_spans.append(updated_span)
|
|
159
|
+
self.llm_logger.info(f"Pushed {updated_span.spankind} span {updated_span.id} to recorded spans.")
|
|
160
|
+
|
|
161
|
+
def end_recording(self, outputs: Dict[str, Any], span: CreateSpan, **kwargs):
|
|
162
|
+
updated_span = CreateSpan(
|
|
163
|
+
**span.dict(),
|
|
164
|
+
end_time=datetime.now(timezone.utc),
|
|
165
|
+
outputs=[outputs["message"]],
|
|
166
|
+
cost=outputs.get("cost", None),
|
|
167
|
+
environment=kwargs.get("environment"),
|
|
168
|
+
tokens=outputs.get("usage"),
|
|
169
|
+
)
|
|
170
|
+
self.recorded_spans.append(updated_span)
|
|
171
|
+
self.llm_logger.info(
|
|
172
|
+
f"Pushed workflow span {updated_span.id} to recorded spans."
|
|
173
|
+
)
|
|
174
|
+
self.llm_logger.info(f"Preparing to send recorded spans for processing.")
|
|
175
|
+
self.tasks_manager.add_task(
|
|
176
|
+
self.active_trace.id,
|
|
177
|
+
"trace",
|
|
178
|
+
self.client.create_traces(
|
|
179
|
+
trace=self.recording_trace_id, spans=self.recorded_spans
|
|
180
|
+
),
|
|
181
|
+
self.client,
|
|
182
|
+
)
|
|
183
|
+
self.llm_logger.info(
|
|
184
|
+
f"Tracing for {span.id} recorded successfully and sent for processing."
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
def _create_trace_id(self) -> str:
|
|
188
|
+
"""Creates a unique mongo id for the trace object.
|
|
189
|
+
|
|
190
|
+
Returns:
|
|
191
|
+
str: stringify oid of the trace
|
|
192
|
+
"""
|
|
193
|
+
|
|
194
|
+
return str(ObjectId())
|
|
195
|
+
|
|
196
|
+
def _create_span_id(self) -> str:
|
|
197
|
+
"""Creates a unique mongo id for the span object.
|
|
198
|
+
|
|
199
|
+
Returns:
|
|
200
|
+
str: stringify oid of the span
|
|
201
|
+
"""
|
|
202
|
+
|
|
203
|
+
return str(ObjectId())
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class LLMLogger:
|
|
5
|
+
def __init__(self, name="LLMLogger", level=logging.INFO):
|
|
6
|
+
self.logger = logging.getLogger(name)
|
|
7
|
+
self.logger.setLevel(level)
|
|
8
|
+
|
|
9
|
+
# Add a stream logger to view the logs in the console
|
|
10
|
+
console_handler = logging.StreamHandler()
|
|
11
|
+
self.logger.addHandler(console_handler)
|
|
12
|
+
|
|
13
|
+
@property
|
|
14
|
+
def log(self) -> logging.Logger:
|
|
15
|
+
return self.logger
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# Initialize llm logger
|
|
19
|
+
llm_logger = LLMLogger().log
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Stdlib Imports
|
|
2
|
+
import queue
|
|
3
|
+
import asyncio
|
|
4
|
+
from logging import Logger
|
|
5
|
+
from typing import Coroutine, Optional, Union
|
|
6
|
+
from concurrent.futures import ThreadPoolExecutor
|
|
7
|
+
|
|
8
|
+
# Own Imports
|
|
9
|
+
from agenta.client.backend.types.error import Error
|
|
10
|
+
from agenta.client.backend.client import AsyncObservabilityClient
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class AsyncTask(object):
|
|
14
|
+
"""Wraps a coroutine (an asynchronous function defined with async def).
|
|
15
|
+
|
|
16
|
+
Args:
|
|
17
|
+
coroutine (Coroutine): asynchronous function
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
def __init__(
|
|
21
|
+
self,
|
|
22
|
+
coroutine_id: str,
|
|
23
|
+
coroutine_type: str,
|
|
24
|
+
coroutine: Coroutine,
|
|
25
|
+
client: AsyncObservabilityClient,
|
|
26
|
+
):
|
|
27
|
+
self.coroutine_id = coroutine_id
|
|
28
|
+
self.coroutine_type = coroutine_type
|
|
29
|
+
self.coroutine = coroutine
|
|
30
|
+
self.task: Optional[asyncio.Task] = None
|
|
31
|
+
self.client = client
|
|
32
|
+
|
|
33
|
+
async def run(self) -> Union[asyncio.Task, Error]:
|
|
34
|
+
"""Creates an asyncio Task from the coroutine and starts it
|
|
35
|
+
|
|
36
|
+
Returns:
|
|
37
|
+
Task: asyncio task
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
try:
|
|
41
|
+
self.task = asyncio.create_task(self.coroutine)
|
|
42
|
+
except Exception as exc:
|
|
43
|
+
return Error(message="error running task", stacktrace=str(exc))
|
|
44
|
+
return await self.task
|
|
45
|
+
|
|
46
|
+
def cancel(self):
|
|
47
|
+
"""
|
|
48
|
+
Cancels running asyncio Task.
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
if self.task:
|
|
52
|
+
self.task.cancel()
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class TaskQueue(object):
|
|
56
|
+
"""Stores a list of AsyncTask instances.
|
|
57
|
+
|
|
58
|
+
Args:
|
|
59
|
+
tasks (List[AsyncTasks]): list of async task instances
|
|
60
|
+
|
|
61
|
+
Example Usage:
|
|
62
|
+
```python
|
|
63
|
+
queue = TaskQueue()
|
|
64
|
+
queue.add_task(long_running_task(1))
|
|
65
|
+
queue.add_task(long_running_task(2))
|
|
66
|
+
```
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
def __init__(self, num_workers: int, logger: Logger):
|
|
70
|
+
self.tasks = queue.Queue() # type: ignore
|
|
71
|
+
self._logger = logger
|
|
72
|
+
self._thread_pool = ThreadPoolExecutor(max_workers=num_workers)
|
|
73
|
+
|
|
74
|
+
def add_task(
|
|
75
|
+
self,
|
|
76
|
+
coroutine_id: str,
|
|
77
|
+
coroutine_type: str,
|
|
78
|
+
coroutine: Coroutine,
|
|
79
|
+
obs_client: AsyncObservabilityClient,
|
|
80
|
+
) -> AsyncTask:
|
|
81
|
+
"""Adds a new task to be executed.
|
|
82
|
+
|
|
83
|
+
Args:
|
|
84
|
+
coroutine_id (str): The Id of the coroutine
|
|
85
|
+
coroutine_type (str): The type of coroutine
|
|
86
|
+
coroutine (Coroutine): async task
|
|
87
|
+
obs_client (AsyncObservabilityClient): The async observability client
|
|
88
|
+
|
|
89
|
+
Returns:
|
|
90
|
+
AsyncTask: task to be executed
|
|
91
|
+
"""
|
|
92
|
+
|
|
93
|
+
task = AsyncTask(coroutine_id, coroutine_type, coroutine, obs_client)
|
|
94
|
+
self.tasks.put(task)
|
|
95
|
+
return self._worker()
|
|
96
|
+
|
|
97
|
+
def _worker(self):
|
|
98
|
+
"""
|
|
99
|
+
Runs task gotten from the queue in a thread pool.
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
while True:
|
|
103
|
+
task: AsyncTask = self.tasks.get() # type: ignore
|
|
104
|
+
try:
|
|
105
|
+
future = self._thread_pool.submit(asyncio.run, task.run())
|
|
106
|
+
future.result()
|
|
107
|
+
except Exception as exc:
|
|
108
|
+
self._logger.error(f"Error running task: {str(exc)}")
|
|
109
|
+
self._logger.error(
|
|
110
|
+
f"Recording trace {task.coroutine_type} status to ERROR."
|
|
111
|
+
)
|
|
112
|
+
break
|
|
113
|
+
finally:
|
|
114
|
+
self.tasks.task_done()
|
|
115
|
+
break
|
|
116
|
+
|
|
117
|
+
def _get_size(self) -> int:
|
|
118
|
+
"""Returns the approximate number of items in the queue."""
|
|
119
|
+
|
|
120
|
+
return self.tasks.qsize()
|
|
121
|
+
|
|
122
|
+
def flush(self) -> None:
|
|
123
|
+
"""Clears all items from the queue."""
|
|
124
|
+
|
|
125
|
+
q_size = self._get_size()
|
|
126
|
+
self._logger.info("Flushing queue...")
|
|
127
|
+
with self.tasks.mutex: # acts as a lock to ensure that only one thread can access the queue
|
|
128
|
+
self.tasks.join()
|
|
129
|
+
self._logger.info(f"Queue with {q_size} items flushed successfully")
|
|
130
|
+
return
|
agenta/sdk/types.py
CHANGED
|
@@ -127,44 +127,6 @@ class MultipleChoiceParam(str):
|
|
|
127
127
|
)
|
|
128
128
|
|
|
129
129
|
|
|
130
|
-
class GroupedMultipleChoiceParam(str):
|
|
131
|
-
def __new__(cls, default: str = None, choices: Dict[str, List[str]] = None):
|
|
132
|
-
if choices is None:
|
|
133
|
-
choices = {}
|
|
134
|
-
|
|
135
|
-
if default and not any(default in choices for choices in choices.values()):
|
|
136
|
-
if not choices:
|
|
137
|
-
print(
|
|
138
|
-
f"Warning: Default value {default} provided but choices are empty."
|
|
139
|
-
)
|
|
140
|
-
else:
|
|
141
|
-
raise ValueError(
|
|
142
|
-
f"Default value {default} is not in the provided choices"
|
|
143
|
-
)
|
|
144
|
-
|
|
145
|
-
if not default:
|
|
146
|
-
for choices in choices.values():
|
|
147
|
-
if choices:
|
|
148
|
-
default = choices[0]
|
|
149
|
-
break
|
|
150
|
-
|
|
151
|
-
instance = super().__new__(cls, default)
|
|
152
|
-
instance.choices = choices
|
|
153
|
-
instance.default = default
|
|
154
|
-
return instance
|
|
155
|
-
|
|
156
|
-
@classmethod
|
|
157
|
-
def __modify_schema__(cls, field_schema: dict[str, Any], **kwargs):
|
|
158
|
-
choices = kwargs.get("choices", {})
|
|
159
|
-
field_schema.update(
|
|
160
|
-
{
|
|
161
|
-
"x-parameter": "grouped_choice",
|
|
162
|
-
"type": "string",
|
|
163
|
-
"choices": choices,
|
|
164
|
-
}
|
|
165
|
-
)
|
|
166
|
-
|
|
167
|
-
|
|
168
130
|
class Message(BaseModel):
|
|
169
131
|
role: str
|
|
170
132
|
content: str
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: agenta
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.13.0a0
|
|
4
4
|
Summary: The SDK for agenta is an open-source LLMOps platform.
|
|
5
5
|
Home-page: https://agenta.ai
|
|
6
6
|
Keywords: LLMOps,LLM,evaluation,prompt engineering
|
|
@@ -23,6 +23,7 @@ Requires-Dist: importlib-metadata (>=6.7.0,<7.0.0)
|
|
|
23
23
|
Requires-Dist: ipdb (>=0.13)
|
|
24
24
|
Requires-Dist: posthog (>=3.1.0,<4.0.0)
|
|
25
25
|
Requires-Dist: pydantic (==1.10.13)
|
|
26
|
+
Requires-Dist: pymongo (>=4.6.3,<5.0.0)
|
|
26
27
|
Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
|
|
27
28
|
Requires-Dist: python-multipart (>=0.0.6,<0.0.7)
|
|
28
29
|
Requires-Dist: questionary (>=1.10.0,<2.0.0)
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
agenta/__init__.py,sha256=EqEmL_hYYa0m2mj8xVK1IWCXRJuDj3IcacY7t3XenZM,548
|
|
2
|
+
agenta/cli/evaluation_commands.py,sha256=fs6492tprPId9p8eGO02Xy-NCBm2RZNJLZWcUxugwd8,474
|
|
3
|
+
agenta/cli/helper.py,sha256=k3qrrwcaIztWsHCBx6tD57ZPDfLzI8lCoDjL5F9yvSc,6204
|
|
4
|
+
agenta/cli/main.py,sha256=oDhr3cBOjm5EisXbq8ix8RFptDmwl0hsXbyIyQ9LXf4,9492
|
|
5
|
+
agenta/cli/telemetry.py,sha256=GaFFRsE_NtrcSSJ10r2jhgFs5Sk8gf2C09Ox3gOr3eU,1317
|
|
6
|
+
agenta/cli/variant_commands.py,sha256=y1OQgdVAjqiGldgih1rORtuFqOytD4Ncuh-vMue3gik,16915
|
|
7
|
+
agenta/cli/variant_configs.py,sha256=PLiuMKadVzs6Gi2uYaT0pZzyULNHDXaTMDWboqpwWdU,1293
|
|
8
|
+
agenta/client/Readme.md,sha256=zWJ6VMYCG124op5RcqgWBdJdlGkGQ2rPLk9F32rWvqo,2756
|
|
9
|
+
agenta/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
agenta/client/api.py,sha256=0u1vd7V2ctFEtY6KeGGiOeoDv6vyeit32u6c6BVyc4w,2434
|
|
11
|
+
agenta/client/api_models.py,sha256=zebfE2-0-SW1SvzyarzmSJMXqyiCLKrX2sHpzoX-RnU,623
|
|
12
|
+
agenta/client/backend/__init__.py,sha256=tkSqI-dciccMpM2diWMe7pF0SjsGXPV_kR-029xNN9w,3853
|
|
13
|
+
agenta/client/backend/client.py,sha256=9Zi2At6kKGzT6cWc1-EDj369yoGrhxCWYRO6Ufs0C_s,72217
|
|
14
|
+
agenta/client/backend/core/__init__.py,sha256=QJS3CJ2TYP2E1Tge0CS6Z7r8LTNzJHQVX1hD3558eP0,519
|
|
15
|
+
agenta/client/backend/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
|
16
|
+
agenta/client/backend/core/client_wrapper.py,sha256=kQEqxdm31r7V9x--mMliWOdMujD3dtPZyYBNzxgNdrs,972
|
|
17
|
+
agenta/client/backend/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
|
18
|
+
agenta/client/backend/core/jsonable_encoder.py,sha256=MTYkDov2EryHgee4QM46uZiBOuOXK9KTHlBdBwU-CpU,3799
|
|
19
|
+
agenta/client/backend/core/remove_none_from_dict.py,sha256=8m91FC3YuVem0Gm9_sXhJ2tGvP33owJJdrqCLEdowGw,330
|
|
20
|
+
agenta/client/backend/errors/__init__.py,sha256=pbbVUFtB9LCocA1RMWMMF_RKjsy5YkOKX5BAuE49w6g,170
|
|
21
|
+
agenta/client/backend/errors/unprocessable_entity_error.py,sha256=FvR7XPlV3Xx5nu8HNlmLhBRdk4so_gCHjYT5PyZe6sM,313
|
|
22
|
+
agenta/client/backend/resources/__init__.py,sha256=H2HX6KHYvPUVq39rRQf37OpBQK7LDWa6tOr_UVBUKAo,555
|
|
23
|
+
agenta/client/backend/resources/apps/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
24
|
+
agenta/client/backend/resources/apps/client.py,sha256=qQjP-fX5QMeKeKh2LlzxKEG6oMlNYb8f7db3UUBda-8,36212
|
|
25
|
+
agenta/client/backend/resources/bases/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
26
|
+
agenta/client/backend/resources/bases/client.py,sha256=iAe6yNwqu9B8UJQI8ElL5A14Xh_bvPcGut7DzhjLcS0,4751
|
|
27
|
+
agenta/client/backend/resources/configs/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
28
|
+
agenta/client/backend/resources/configs/client.py,sha256=Gwix4eOpBW48Z89g43xWW7g1OULmG7KFjiHHS2wXgY8,13151
|
|
29
|
+
agenta/client/backend/resources/containers/__init__.py,sha256=Haw2PwiPhNvM26PLQN57jY0bN-QqPoDG4VA-P_uGL3A,153
|
|
30
|
+
agenta/client/backend/resources/containers/client.py,sha256=XfsEd5phPRD6UufcEA6pYwbFXZgZYM-Uknl-BaGvT3o,14131
|
|
31
|
+
agenta/client/backend/resources/containers/types/__init__.py,sha256=b6yQ-p_vsI5cpKh-Qa8xNE-M5nLHjfBvfgD4JIhqEkY,176
|
|
32
|
+
agenta/client/backend/resources/containers/types/container_templates_response.py,sha256=_wjAb-dqy5-pXdkQtgOatChpbyAHnc_zSXurG0e_QSk,191
|
|
33
|
+
agenta/client/backend/resources/environments/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
34
|
+
agenta/client/backend/resources/environments/client.py,sha256=FsgTZ74_pPs4t8G58nS60CiRkKmZM16NhYaZCENG3mA,4496
|
|
35
|
+
agenta/client/backend/resources/evaluations/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
36
|
+
agenta/client/backend/resources/evaluations/client.py,sha256=sJ3l6OsNPZV8PB7Focw06KKdBhF2KKwjQ5YqNxcn4lI,36115
|
|
37
|
+
agenta/client/backend/resources/evaluators/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
38
|
+
agenta/client/backend/resources/evaluators/client.py,sha256=9v5WDk_G7exMnIAJtqZvhT3s94UCi6DPkdv0L4_uecE,21177
|
|
39
|
+
agenta/client/backend/resources/observability/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
40
|
+
agenta/client/backend/resources/observability/client.py,sha256=kZmZJPpVq5RdSLchxUkjhbGOYqwqAQDnrDKcQjChjCw,41866
|
|
41
|
+
agenta/client/backend/resources/testsets/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
42
|
+
agenta/client/backend/resources/testsets/client.py,sha256=FTxUrDR6VwqnflIe90MnLgTM26vg7MBXaRZqTFnVEbU,24436
|
|
43
|
+
agenta/client/backend/resources/variants/__init__.py,sha256=BMR4SvsrqXC9FU8nPVzY8M9xGrBEhEGrmbgvy3iM1aE,171
|
|
44
|
+
agenta/client/backend/resources/variants/client.py,sha256=mGf_iyGlFKaMqaqaT4m6UCrJCsIdJ-nVkb2_4_6DhZc,29056
|
|
45
|
+
agenta/client/backend/resources/variants/types/__init__.py,sha256=OnOdJBG9tZwCBupbe-6Yogm8w7PGdO5ro3NNZHq_Rz8,207
|
|
46
|
+
agenta/client/backend/resources/variants/types/add_variant_from_base_and_config_response.py,sha256=kepx7JD-7E4_vFiqxafZU57ZI2aSzMh_JXw23KK1nOs,226
|
|
47
|
+
agenta/client/backend/types/__init__.py,sha256=FQnM1StuSHHC1FaQ-785TMyanZg2f3E0CblxR4SQ2Rg,5089
|
|
48
|
+
agenta/client/backend/types/aggregated_result.py,sha256=R5EnfpbRJHjszOa6DDOHXANROjHc6Eu_AHCDOlCjxYQ,1039
|
|
49
|
+
agenta/client/backend/types/aggregated_result_evaluator_config.py,sha256=q8Xp_CelxKtBwS2DOCHIyx0WuWejTuODIB0Na34rLyA,221
|
|
50
|
+
agenta/client/backend/types/app.py,sha256=HOJuRb1UrGy7CLSVF2bNzFbjGoTbjV44HZvNXSq6vCY,880
|
|
51
|
+
agenta/client/backend/types/app_variant_response.py,sha256=0OsqprSELiP9ueyE7dcAlCtPmk6hVEYjLZWXyuVivBs,1250
|
|
52
|
+
agenta/client/backend/types/app_variant_revision.py,sha256=D2jpTkinrQKqiaeBYABx_DY1-X0Elt2nNIJHRSyV6SQ,981
|
|
53
|
+
agenta/client/backend/types/base_output.py,sha256=2Uvig4BgcnXpp4Uacm0uvQM2bay8sgM_7qJhhAt3djI,889
|
|
54
|
+
agenta/client/backend/types/body_import_testset.py,sha256=I-5lzeNiKJNpKtLBISrB0vHCuFjUHIQl0TueK9hotVY,967
|
|
55
|
+
agenta/client/backend/types/config_db.py,sha256=IIipuGPO_Geny1O1oJ_Rp4vHHzkfDu_I3JBe9fFQJaE,934
|
|
56
|
+
agenta/client/backend/types/create_app_output.py,sha256=i0EtuF1riWia-dja38qMzK5DUF1jDSQcH-QyC4M9yUo,892
|
|
57
|
+
agenta/client/backend/types/create_span.py,sha256=xRTHRA9zugsEGk8rZNcrgzkJCdAvrKVaZMjnkKcExlA,1660
|
|
58
|
+
agenta/client/backend/types/create_trace_response.py,sha256=1zQb6We00PbX5q3ejD75dFLhyM9QWeQgnC1hb_oQZAU,918
|
|
59
|
+
agenta/client/backend/types/docker_env_vars.py,sha256=jBlnYS48mzfz2RD-gyyUOhL5ySSEhL48hjIgUTy-BIg,892
|
|
60
|
+
agenta/client/backend/types/environment_output.py,sha256=Ze9FidHFH0PJYK0nHFXNuTmmo4nTx7OTkXz2ba51NHk,1163
|
|
61
|
+
agenta/client/backend/types/environment_output_extended.py,sha256=xUt7Tonz4NF9mNWnbvb_FbAx56bV9dFp_jRTZu6JvKk,1273
|
|
62
|
+
agenta/client/backend/types/environment_revision.py,sha256=R717-TBMVI3jd2DI-i6fFGTPcDX_9MG1S0saK3IxVy0,1034
|
|
63
|
+
agenta/client/backend/types/error.py,sha256=nzso7cqvPcoTkhlVzqKwKppLRWpN3gY1sWRcTQ69wJ8,902
|
|
64
|
+
agenta/client/backend/types/evaluation.py,sha256=di0ljzfvPjc_kCINhjxYNJw6selzPg2Ug9eVwuwS808,1433
|
|
65
|
+
agenta/client/backend/types/evaluation_scenario.py,sha256=zVUUTYn4dX0U-lVssiZW9RANvaFTEvNP2Zg-_YWcz0M,1403
|
|
66
|
+
agenta/client/backend/types/evaluation_scenario_input.py,sha256=uum3D9QqIhwKwOjYGcuCe1Ohq7-rqoPcEo5tb7HGzTs,933
|
|
67
|
+
agenta/client/backend/types/evaluation_scenario_output.py,sha256=6MOs-QqYHbMPPYFOH2adD6FUYfN_zSLIKXEMw9b8Alo,982
|
|
68
|
+
agenta/client/backend/types/evaluation_scenario_result.py,sha256=UE8XmErLRc7kn1ToaeU0FBr3qm6KRMgM6KAELGSF2QA,939
|
|
69
|
+
agenta/client/backend/types/evaluation_scenario_score_update.py,sha256=tsuOwDXesgNEBu4_ItJcWgtLn-j6g6nZaY97z-WVtSM,889
|
|
70
|
+
agenta/client/backend/types/evaluation_status_enum.py,sha256=Pf3iyPYgdpEdlEUuphWwyz5F6-ujofod3UUTbv5_GDI,1372
|
|
71
|
+
agenta/client/backend/types/evaluation_type.py,sha256=ZFQn7gD4cJkHU8tSA1s3HH8lLH24ISDDuHb6K1C48mI,627
|
|
72
|
+
agenta/client/backend/types/evaluation_webhook.py,sha256=C4j4pksPySSDrvK-w7KlFRRmIUKfyoTjtauKtHd28FA,877
|
|
73
|
+
agenta/client/backend/types/evaluator.py,sha256=CN38kMdXI7MmqcK3GcC6g62S4eGo-rkCnKC0fCBBQ_g,990
|
|
74
|
+
agenta/client/backend/types/evaluator_config.py,sha256=zg-3PP57BjJWoHxkiP0lr3OYDh1RpjYeCRF9yTHO3Jg,1030
|
|
75
|
+
agenta/client/backend/types/feedback.py,sha256=KdWndLrtWFAvcVd8fkWSAegwQOGxTZSaTzUYEqMtwd4,1042
|
|
76
|
+
agenta/client/backend/types/get_config_response.py,sha256=4zQk-O-crtjf7nwL3K7uT7EGqQuQvnN1HP6N8iBIoD0,987
|
|
77
|
+
agenta/client/backend/types/http_validation_error.py,sha256=CDHSqRT_pUnxYWrHnFmgHyem5vZ3A5aPtFJGcmyE1m8,966
|
|
78
|
+
agenta/client/backend/types/human_evaluation.py,sha256=_3jLAmRj0RNP4uEkE5iP5e_VwrE79QrboqWzEZ9AeUs,1211
|
|
79
|
+
agenta/client/backend/types/human_evaluation_scenario.py,sha256=3jp6zUSGjyCLasTUI8LGhsyRSQNOf2YNVRjzdTy4Ac0,1414
|
|
80
|
+
agenta/client/backend/types/human_evaluation_scenario_input.py,sha256=273wHmDK1TfdFuYX318vVrAcTOnpoish2z--euBV-GY,912
|
|
81
|
+
agenta/client/backend/types/human_evaluation_scenario_output.py,sha256=f970ElW1QW2oE9qlcQQxtmcR5PKTNeNLmiu5Q7SUdvA,916
|
|
82
|
+
agenta/client/backend/types/human_evaluation_scenario_update.py,sha256=fN5Yzq81yCd6AnzGmV6Z4Bf4hqoVavgAr848meq7_Kg,1365
|
|
83
|
+
agenta/client/backend/types/human_evaluation_update.py,sha256=HXNnV4aMRcIGY9uMsrS6bWq_pFEvI0spjCoqsAx0PWM,971
|
|
84
|
+
agenta/client/backend/types/image.py,sha256=ZLQ5dBCGQT2Q4vrrOSIGwoQhmFiuqffH7J8Qp41CIu8,993
|
|
85
|
+
agenta/client/backend/types/invite_request.py,sha256=njlIoxlsYuEAKRAvgLbwy7vfq3KnC__6ePt1LbdDaxI,899
|
|
86
|
+
agenta/client/backend/types/list_api_keys_response.py,sha256=V-gNYXtz9ls7cf_8DKTIYecMoMxSs2cmslY-rRcoLIk,1003
|
|
87
|
+
agenta/client/backend/types/llm_run_rate_limit.py,sha256=xMP8IRV_UgD2OYJmx1gkeBpoivsr-5lCvk42PlD8FnM,951
|
|
88
|
+
agenta/client/backend/types/llm_tokens.py,sha256=2YUf2Qae8RS4TqYytOFVNeHQ4lQ0SXsxUoS7MrIiXpQ,975
|
|
89
|
+
agenta/client/backend/types/new_human_evaluation.py,sha256=iY-SOdcVxb8agai-WEmLtiKoCg2Y3sy9ut3TYSMJ0EI,1056
|
|
90
|
+
agenta/client/backend/types/new_testset.py,sha256=DkRJwtf4v-A06UfedyciBVbpJ4QwvmQTmNTiy42_6SE,915
|
|
91
|
+
agenta/client/backend/types/organization.py,sha256=z_iFtaRD9l4mjA3z0Ae8TxSeSfUgHkw4KouQJNQ1Tuo,1124
|
|
92
|
+
agenta/client/backend/types/organization_output.py,sha256=950H5Sq_eUg2ppbmWI3mV6nqIkHn4-Pmqb0SGvNg-Ok,887
|
|
93
|
+
agenta/client/backend/types/permission.py,sha256=MwGwNvKhH8W4I0uJZG_mUydJgwE5CF1pJOEExvjkAy4,6407
|
|
94
|
+
agenta/client/backend/types/result.py,sha256=2HSJ916d0MV5PRhzHvH2lnYePjOoUzYn1Ye2GiItKts,961
|
|
95
|
+
agenta/client/backend/types/score.py,sha256=OAur_nJtRQmpboZfzFi2l1-zmNxFfETcl13C7OAvpMw,111
|
|
96
|
+
agenta/client/backend/types/simple_evaluation_output.py,sha256=IMLZ0KJ0jtVZE6Vp3o6fghQjh2VSyiLycLZGgeYk7J8,1023
|
|
97
|
+
agenta/client/backend/types/span.py,sha256=65IP0B2tpioIZW4eoBDom8pS3kH7CZ-6kcx-OBVmac4,1361
|
|
98
|
+
agenta/client/backend/types/span_detail.py,sha256=sJh9EpM55B7bqo5_nKATHIybmMbUIoaXUJvbn8NTVjQ,1425
|
|
99
|
+
agenta/client/backend/types/span_kind.py,sha256=3i1C1U-NzDgFpgw8QL0c7CwHHhejCUpSmq5FD1YHiJI,1324
|
|
100
|
+
agenta/client/backend/types/span_status_code.py,sha256=uxcUEsPLQa2r2eIgYw8LRmMj5GQaE98UnL1JgUsdyuM,643
|
|
101
|
+
agenta/client/backend/types/span_variant.py,sha256=IpVszBqsWueV4jlixWrFpkdb_LDtXpeiJnseVjB9yik,914
|
|
102
|
+
agenta/client/backend/types/template.py,sha256=PbQMG4DmItMCXUaY4L6V8gm_yMdYoKERCwF3ycRTDLc,943
|
|
103
|
+
agenta/client/backend/types/template_image_info.py,sha256=6mx71Fv56KuLzkSZZ5TPf5pS5MPSPgthDOLiqGXhej0,1095
|
|
104
|
+
agenta/client/backend/types/test_set_output_response.py,sha256=QBkCKuaAdF8EJnM57bra8hGV3dDPwa8lQenYu6dwwnI,994
|
|
105
|
+
agenta/client/backend/types/test_set_simple_response.py,sha256=euSWgCQ7qqYcZ0Kv0IHUhtjY86ejZ9SYmwPVremAzqA,910
|
|
106
|
+
agenta/client/backend/types/trace_detail.py,sha256=yc873SyCOpG9vYm1AZ1x6dJQ6tRqdDEbkWu05Y8fts0,1409
|
|
107
|
+
agenta/client/backend/types/uri.py,sha256=1QunY-twQKtfDAfg33ymejfBtx8dtyNQSpcCbx35dpQ,859
|
|
108
|
+
agenta/client/backend/types/validation_error.py,sha256=2JhGNJouo8QpfrMBoT_JCwYSn1nFN2Nnq0p9uPLDH-U,992
|
|
109
|
+
agenta/client/backend/types/validation_error_loc_item.py,sha256=LAtjCHIllWRBFXvAZ5QZpp7CPXjdtN9EB7HrLVo6EP0,128
|
|
110
|
+
agenta/client/backend/types/variant_action.py,sha256=CJ3GVzfYm7-tPstk48Py1k57pixeKJERAUHw-s3TY60,937
|
|
111
|
+
agenta/client/backend/types/variant_action_enum.py,sha256=4Hd8JKpRyv2Lg5id1LnpL0dVFEdifqRtszQQxG0O9cs,497
|
|
112
|
+
agenta/client/backend/types/with_pagination.py,sha256=Fq5am8lPGL2py8czlwwlclEilnbOGSSNp3m-rzwViXI,1020
|
|
113
|
+
agenta/client/backend/types/workspace_member_response.py,sha256=j0wEgWb1CN9DAlCAdwIqZFIFU2Q7SP1KhAqGsdCATdA,1003
|
|
114
|
+
agenta/client/backend/types/workspace_permission.py,sha256=eVXZIov8z-2zP8ancUrhmwVOLjwhqZfDpcNh88MhBHc,1069
|
|
115
|
+
agenta/client/backend/types/workspace_response.py,sha256=5Ms1oGH3R3936GTeytLA3AKdYNo2T_Z9rX9YbciT1sQ,1197
|
|
116
|
+
agenta/client/backend/types/workspace_role.py,sha256=PxKM8IcPoair8nK2Ed0GXZQxVffjy_0OcvytES0htc8,1198
|
|
117
|
+
agenta/client/backend/types/workspace_role_response.py,sha256=2zpjx3quaSijREUvHjcgELyr9ZPJZsKqlrLs0wnkbVM,978
|
|
118
|
+
agenta/client/client.py,sha256=DWOGS9A8u4wu28s9jGOR4eRhf7vo4zT7GyDvrIGu59Y,19648
|
|
119
|
+
agenta/client/exceptions.py,sha256=cxLjjKvZKlUgBxt4Vn9J_SsezJPPNHvrZxnoq-D6zmw,94
|
|
120
|
+
agenta/config.py,sha256=Id-Ie1yf9QRP1YPhRYaYSOruRe6RBrsCXkG9rAa-ZtA,732
|
|
121
|
+
agenta/config.toml,sha256=ptE0P49bwsu3Luyn7OLFmk2buPhj5D-MA-O_ErOGoLg,223
|
|
122
|
+
agenta/docker/docker-assets/Dockerfile.cloud.template,sha256=CwJbCTezOYCGowA-Hh19f85YXgynT89CrWxjNxLJJfg,317
|
|
123
|
+
agenta/docker/docker-assets/Dockerfile.template,sha256=oIUjbDO2a689esL1XCw8nNyyDRAT3kCyH9_3z6c779Q,241
|
|
124
|
+
agenta/docker/docker-assets/README.md,sha256=XHxwh2ks_ozrtAU7SLbL3J14SB2holG6buoTxwmMiZM,102
|
|
125
|
+
agenta/docker/docker-assets/entrypoint.sh,sha256=29XK8VQjQsx4hN2j-4JDy-6kQb5y4LCqZEa7PD4eqCQ,74
|
|
126
|
+
agenta/docker/docker-assets/lambda_function.py,sha256=h4UZSSfqwpfsCgERv6frqwm_4JrYu9rLz3I-LxCfeEg,83
|
|
127
|
+
agenta/docker/docker-assets/main.py,sha256=7MI-21n81U7N7A0GxebNi0cmGWtJKcR2sPB6FcH2QfA,251
|
|
128
|
+
agenta/docker/docker_utils.py,sha256=ueA-t4-UCZDemEMPUX6GqST-0Ewfc05G3GKkmRJuK4w,3422
|
|
129
|
+
agenta/sdk/__init__.py,sha256=GUZ5-xQtVK5Jwrr0iz2aalAQCNvNg283o8vRKVaH9nQ,616
|
|
130
|
+
agenta/sdk/agenta_decorator.py,sha256=Aj_wJznW4f8aWTW6dRmrT9H6bTcHJSe7nXx9p9HzPik,16831
|
|
131
|
+
agenta/sdk/agenta_init.py,sha256=KHiIBtItXxOAkVtuFQfwokvw1_Xop8cCKYoVoqCMx5g,8886
|
|
132
|
+
agenta/sdk/context.py,sha256=q-PxL05-I84puunUAs9LGsffEXcYhDxhQxjuOz2vK90,901
|
|
133
|
+
agenta/sdk/router.py,sha256=0sbajvn5C7t18anH6yNo7-oYxldHnYfwcbmQnIXBePw,269
|
|
134
|
+
agenta/sdk/tracing/context_manager.py,sha256=HskDaiORoOhjeN375gm05wYnieQzh5UnoIsnSAHkAyc,252
|
|
135
|
+
agenta/sdk/tracing/decorators.py,sha256=ujtU8gf3GDoHYuLTfEYK_2eIYZ-1oX5dpv02Mf4l_II,1191
|
|
136
|
+
agenta/sdk/tracing/llm_tracing.py,sha256=ub-ujV96Ysij-uYq471gIChoLI7dpiX6cQqPOBrDF6w,6876
|
|
137
|
+
agenta/sdk/tracing/logger.py,sha256=4zG9c51p8xPdKA5SL8MOgBfkpCnBSuV6JfWiXO0A7oc,473
|
|
138
|
+
agenta/sdk/tracing/tasks_manager.py,sha256=XVGBEOwmHa6KcCC0PApk0_bZ0Ilk2ESuduNObB1rw2s,3792
|
|
139
|
+
agenta/sdk/types.py,sha256=GiUiXDkbM2pMx1-mldzQT8uDUcm9sRqVUytThEkbjj4,4658
|
|
140
|
+
agenta/sdk/utils/globals.py,sha256=lpgflY8xovZJtHfJf41dbNCZGwx07YNkG9ldruv6xoI,360
|
|
141
|
+
agenta/sdk/utils/helper/openai_cost.py,sha256=1VkgvucDnNZm1pTfcVLz9icWunntp1d7zwMmnviy3Uw,5877
|
|
142
|
+
agenta/sdk/utils/preinit.py,sha256=YlJL7RLfel0R7DFp-jK7OV-z4ZIQJM0oupYlk7g8b5o,1278
|
|
143
|
+
agenta/templates/compose_email/README.md,sha256=ss7vZPpI1Hg0VmYtFliwq_r5LnqbCy_S5OQDXg8UoIA,308
|
|
144
|
+
agenta/templates/compose_email/app.py,sha256=SG8QnBkC49MtvWa2z5_YQ2d8wxZxhO_hWs15j3CsWvc,2384
|
|
145
|
+
agenta/templates/compose_email/env.example,sha256=g9AE5bYcGPpxawXMJ96gh8oenEPCHTabsiOnfQo3c5k,70
|
|
146
|
+
agenta/templates/compose_email/requirements.txt,sha256=ywRglRy7pPkw8bljmMEJJ4aOOQKrt9FGKULZ-DGkoBU,23
|
|
147
|
+
agenta/templates/compose_email/template.toml,sha256=H0y1i4t-gHgc-dbiTWcf3QiMAOU92MgkY_V9x3Tob-E,47
|
|
148
|
+
agenta/templates/extract_data_to_json/README.md,sha256=ss7vZPpI1Hg0VmYtFliwq_r5LnqbCy_S5OQDXg8UoIA,308
|
|
149
|
+
agenta/templates/extract_data_to_json/app.py,sha256=xNm9Gs2LzLujm1ox-T1Cn0JkU2tmYPqhwuAR9HnHa9Y,1320
|
|
150
|
+
agenta/templates/extract_data_to_json/env.example,sha256=g9AE5bYcGPpxawXMJ96gh8oenEPCHTabsiOnfQo3c5k,70
|
|
151
|
+
agenta/templates/extract_data_to_json/requirements.txt,sha256=ywRglRy7pPkw8bljmMEJJ4aOOQKrt9FGKULZ-DGkoBU,23
|
|
152
|
+
agenta/templates/extract_data_to_json/template.toml,sha256=5TpnTRmvHbIzANevDCCHc8AOJXL431TN2sBor6tosUY,60
|
|
153
|
+
agenta/templates/simple_prompt/README.md,sha256=ss7vZPpI1Hg0VmYtFliwq_r5LnqbCy_S5OQDXg8UoIA,308
|
|
154
|
+
agenta/templates/simple_prompt/app.py,sha256=kODgF6lhzsaJPdgL5b21bUki6jkvqjWZzWR9KdBQ1Yc,646
|
|
155
|
+
agenta/templates/simple_prompt/env.example,sha256=g9AE5bYcGPpxawXMJ96gh8oenEPCHTabsiOnfQo3c5k,70
|
|
156
|
+
agenta/templates/simple_prompt/requirements.txt,sha256=ywRglRy7pPkw8bljmMEJJ4aOOQKrt9FGKULZ-DGkoBU,23
|
|
157
|
+
agenta/templates/simple_prompt/template.toml,sha256=DQBtRrF4GU8LBEXOZ-GGuINXMQDKGTEG5y37tnvIUIE,60
|
|
158
|
+
agenta-0.13.0a0.dist-info/METADATA,sha256=anE4m0TsCa2vVc1HgT_aGvLwysYlsytNZCK0dSSTT2A,27378
|
|
159
|
+
agenta-0.13.0a0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
160
|
+
agenta-0.13.0a0.dist-info/entry_points.txt,sha256=PDiu8_8AsL7ibU9v4iNoOKR1S7F2rdxjlEprjM9QOgo,46
|
|
161
|
+
agenta-0.13.0a0.dist-info/RECORD,,
|