agenta 0.14.12a0__py3-none-any.whl → 0.14.12a2__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 CHANGED
@@ -14,7 +14,8 @@ from .sdk.types import (
14
14
  BinaryParam,
15
15
  )
16
16
  from .sdk.tracing.llm_tracing import Tracing
17
- from .sdk.decorators.tracing import instrument, tracing
17
+ from .sdk.decorators import tracing
18
+ from .sdk.decorators.tracing import instrument
18
19
  from .sdk.decorators.llm_entrypoint import entrypoint
19
20
  from .sdk.agenta_init import Config, init
20
21
  from .sdk.utils.helper.openai_cost import calculate_token_usage
@@ -1,9 +1,9 @@
1
1
  FROM public.ecr.aws/s2t9a1r1/agentaai/lambda_templates_public:main
2
2
 
3
3
  COPY requirements.txt ${LAMBDA_TASK_ROOT}
4
+ RUN pip install --no-cache-dir --disable-pip-version-check -U agenta
4
5
  RUN pip install --no-cache-dir --disable-pip-version-check -r requirements.txt
5
6
  RUN pip install --no-cache-dir --disable-pip-version-check mangum
6
- RUN pip install --no-cache-dir --disable-pip-version-check -U agenta
7
7
  COPY . ${LAMBDA_TASK_ROOT}
8
8
 
9
9
  CMD [ "lambda_function.handler" ]
@@ -4,8 +4,8 @@ WORKDIR /app
4
4
 
5
5
  COPY . .
6
6
 
7
- RUN pip install --no-cache-dir --disable-pip-version-check -r requirements.txt
8
7
  RUN pip install --no-cache-dir --disable-pip-version-check -U agenta
8
+ RUN pip install --no-cache-dir --disable-pip-version-check -r requirements.txt
9
9
 
10
10
  EXPOSE 80
11
11
 
agenta/sdk/__init__.py CHANGED
@@ -14,7 +14,7 @@ from .types import (
14
14
  BinaryParam,
15
15
  )
16
16
  from .tracing.llm_tracing import Tracing
17
- from .decorators.tracing import instrument, tracing
17
+ from .decorators.tracing import instrument
18
18
  from .decorators.llm_entrypoint import entrypoint
19
19
  from .agenta_init import Config, init
20
20
  from .utils.helper.openai_cost import calculate_token_usage
agenta/sdk/agenta_init.py CHANGED
@@ -86,7 +86,7 @@ class AgentaSingleton:
86
86
 
87
87
  self.variant_id = os.environ.get("AGENTA_VARIANT_ID")
88
88
  self.variant_name = os.environ.get("AGENTA_VARIANT_NAME")
89
- self.config = Config(base_id=self.base_id, host=self.host)
89
+ self.config = Config(base_id=self.base_id, host=self.host, api_key=self.api_key)
90
90
 
91
91
  def get_app(self, app_name: str) -> str:
92
92
  apps = self.client.apps.list_apps(app_name=app_name)
@@ -113,9 +113,10 @@ class AgentaSingleton:
113
113
 
114
114
 
115
115
  class Config:
116
- def __init__(self, base_id, host):
116
+ def __init__(self, base_id: str, host: str, api_key: str):
117
117
  self.base_id = base_id
118
118
  self.host = host
119
+ self.api_key = api_key
119
120
 
120
121
  if base_id is None or host is None:
121
122
  self.persist = False
@@ -130,8 +131,7 @@ class Config:
130
131
  AgentaAPI: instance of agenta api backend
131
132
  """
132
133
 
133
- sdk_client = SDKClient(api_key=self.api_key, host=self.host) # type: ignore
134
- return sdk_client._build_sdk_client()
134
+ return AgentaApi(base_url=self.host + "/api", api_key=self.api_key)
135
135
 
136
136
  def register_default(self, overwrite=False, **kwargs):
137
137
  """alias for default"""
@@ -9,10 +9,6 @@ import agenta as ag
9
9
  from agenta.sdk.decorators.base import BaseDecorator
10
10
 
11
11
 
12
- # Set global tracing variable to None
13
- tracing = None
14
-
15
-
16
12
  class instrument(BaseDecorator):
17
13
  """Decorator class for monitoring llm apps functions.
18
14
 
@@ -46,9 +42,9 @@ class instrument(BaseDecorator):
46
42
  api_key=os.environ["AGENTA_API_KEY"],
47
43
  )
48
44
 
49
- # Update tracing variable to be global
50
- global tracing
51
- tracing = self.tracing
45
+ # Set span for global access
46
+ global span
47
+ span = self.tracing
52
48
 
53
49
  def __call__(self, func: Callable[..., Any]):
54
50
  @wraps(func)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: agenta
3
- Version: 0.14.12a0
3
+ Version: 0.14.12a2
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
@@ -1,4 +1,4 @@
1
- agenta/__init__.py,sha256=yXks3d7zLmyJCM3D_L5rk4GnFKHZX2NJa6j6wjAJUGQ,661
1
+ agenta/__init__.py,sha256=Op8Re2QqGz2vqAzuYRgR7S5ACKh5UdpJEA4KlG8SWvo,688
2
2
  agenta/cli/evaluation_commands.py,sha256=fs6492tprPId9p8eGO02Xy-NCBm2RZNJLZWcUxugwd8,474
3
3
  agenta/cli/helper.py,sha256=vRxHyeNaltzNIGrfU2vO0H28_rXDzx9QqIZ_S-W6zL4,6212
4
4
  agenta/cli/main.py,sha256=Wz0ODhoeKK3Qg_CFUhu6D909szk05tc8ZVBB6H1-w7k,9763
@@ -119,20 +119,20 @@ agenta/client/client.py,sha256=DWOGS9A8u4wu28s9jGOR4eRhf7vo4zT7GyDvrIGu59Y,19648
119
119
  agenta/client/exceptions.py,sha256=cxLjjKvZKlUgBxt4Vn9J_SsezJPPNHvrZxnoq-D6zmw,94
120
120
  agenta/config.py,sha256=Id-Ie1yf9QRP1YPhRYaYSOruRe6RBrsCXkG9rAa-ZtA,732
121
121
  agenta/config.toml,sha256=ptE0P49bwsu3Luyn7OLFmk2buPhj5D-MA-O_ErOGoLg,223
122
- agenta/docker/docker-assets/Dockerfile.cloud.template,sha256=f8VU9fs0mMDISGlo3kAYzF8YyDAKgK9FJQHl4PJwykw,386
123
- agenta/docker/docker-assets/Dockerfile.template,sha256=jkZM1dOPUyQiO9q4jn_RR34-A76lhv5CHJmP0OJHyoE,280
122
+ agenta/docker/docker-assets/Dockerfile.cloud.template,sha256=uJuXKvtkMY6f4KaOh3XE5pmuJR7mfZEXJk_8hj2uatc,386
123
+ agenta/docker/docker-assets/Dockerfile.template,sha256=aVA_okx0xXalcTvdQGhSfzSjNpQZVoLJCGYA39-2Nwk,280
124
124
  agenta/docker/docker-assets/README.md,sha256=XHxwh2ks_ozrtAU7SLbL3J14SB2holG6buoTxwmMiZM,102
125
125
  agenta/docker/docker-assets/entrypoint.sh,sha256=29XK8VQjQsx4hN2j-4JDy-6kQb5y4LCqZEa7PD4eqCQ,74
126
126
  agenta/docker/docker-assets/lambda_function.py,sha256=h4UZSSfqwpfsCgERv6frqwm_4JrYu9rLz3I-LxCfeEg,83
127
127
  agenta/docker/docker-assets/main.py,sha256=7MI-21n81U7N7A0GxebNi0cmGWtJKcR2sPB6FcH2QfA,251
128
128
  agenta/docker/docker_utils.py,sha256=5uHMCzXkCvIsDdEiwbnnn97KkzsFbBvyMwogCsv_Z5U,3509
129
- agenta/sdk/__init__.py,sha256=Zqst2m-u5HbV_Y6sGcT7suwbP-XanP-5noLpfKlA2nQ,627
130
- agenta/sdk/agenta_init.py,sha256=KjxMOewpADtlhOAqTbW-T2TQ1oVwKncV1-0ByNwXBpE,8644
129
+ agenta/sdk/__init__.py,sha256=nQS3x2sE_3kuRp6gEhShS_jAZ8hbSBs8i4mkWqdGT6I,618
130
+ agenta/sdk/agenta_init.py,sha256=8D55zEse0YlBhkQGevj2FC8gP1YnMqOo_oEg1CPSyAs,8666
131
131
  agenta/sdk/client.py,sha256=trKyBOYFZRk0v5Eptxvh87yPf50Y9CqY6Qgv4Fy-VH4,2142
132
132
  agenta/sdk/context.py,sha256=q-PxL05-I84puunUAs9LGsffEXcYhDxhQxjuOz2vK90,901
133
133
  agenta/sdk/decorators/base.py,sha256=9aNdX5h8a2mFweuhdO-BQPwXGKY9ONPIdLRhSGAGMfY,217
134
134
  agenta/sdk/decorators/llm_entrypoint.py,sha256=qU_TyYAbhoj-Cf-SSAKzo11Le9qpH-Z4bA_kKQ6iJk0,18643
135
- agenta/sdk/decorators/tracing.py,sha256=w8qBj1P8ft2i7K5NoQBIGEHxfAyfNLiSlvgyRB9m0Mo,2446
135
+ agenta/sdk/decorators/tracing.py,sha256=L0M5oPP6NIZihReBFzYB9JVn60QZghR8ZUTBuok9vyY,2375
136
136
  agenta/sdk/router.py,sha256=0sbajvn5C7t18anH6yNo7-oYxldHnYfwcbmQnIXBePw,269
137
137
  agenta/sdk/tracing/context_manager.py,sha256=HskDaiORoOhjeN375gm05wYnieQzh5UnoIsnSAHkAyc,252
138
138
  agenta/sdk/tracing/llm_tracing.py,sha256=CLijhERu9LYbi-UrUTsUT_jyb_0dT5iO_0o2MpjXk1g,8038
@@ -157,7 +157,7 @@ agenta/templates/simple_prompt/app.py,sha256=kODgF6lhzsaJPdgL5b21bUki6jkvqjWZzWR
157
157
  agenta/templates/simple_prompt/env.example,sha256=g9AE5bYcGPpxawXMJ96gh8oenEPCHTabsiOnfQo3c5k,70
158
158
  agenta/templates/simple_prompt/requirements.txt,sha256=ywRglRy7pPkw8bljmMEJJ4aOOQKrt9FGKULZ-DGkoBU,23
159
159
  agenta/templates/simple_prompt/template.toml,sha256=DQBtRrF4GU8LBEXOZ-GGuINXMQDKGTEG5y37tnvIUIE,60
160
- agenta-0.14.12a0.dist-info/METADATA,sha256=iS-y1oTXaY-6bHnUAIzCa2u7RmDdIJAuY5Kevj75gBI,26466
161
- agenta-0.14.12a0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
162
- agenta-0.14.12a0.dist-info/entry_points.txt,sha256=PDiu8_8AsL7ibU9v4iNoOKR1S7F2rdxjlEprjM9QOgo,46
163
- agenta-0.14.12a0.dist-info/RECORD,,
160
+ agenta-0.14.12a2.dist-info/METADATA,sha256=37JWVWBz4mFIQCZLwACxqhOamzn-Z3VTALgFenew_A4,26466
161
+ agenta-0.14.12a2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
162
+ agenta-0.14.12a2.dist-info/entry_points.txt,sha256=PDiu8_8AsL7ibU9v4iNoOKR1S7F2rdxjlEprjM9QOgo,46
163
+ agenta-0.14.12a2.dist-info/RECORD,,