agenta 0.27.6a1__py3-none-any.whl → 0.27.6a3__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.

@@ -37,19 +37,24 @@ from agenta.sdk.types import (
37
37
 
38
38
  import agenta as ag
39
39
 
40
+
41
+ AGENTA_USE_CORS = str(environ.get("AGENTA_USE_CORS", False)).lower() in (
42
+ "true",
43
+ "1",
44
+ "t",
45
+ )
46
+
40
47
  app = FastAPI()
48
+ log.setLevel("DEBUG")
41
49
 
42
- origins = [
43
- "*",
44
- ]
45
50
 
46
- app.add_middleware(
47
- CORSMiddleware,
48
- allow_origins=origins,
49
- allow_credentials=True,
50
- allow_methods=["*"],
51
- allow_headers=["*"],
52
- )
51
+ if AGENTA_USE_CORS:
52
+ app.add_middleware(
53
+ CORSMiddleware,
54
+ allow_origins=["*"],
55
+ allow_methods=["*"],
56
+ allow_headers=["Authorization"],
57
+ )
53
58
 
54
59
  _MIDDLEWARES = True
55
60
 
@@ -57,7 +62,6 @@ _MIDDLEWARES = True
57
62
  app.include_router(router, prefix="")
58
63
 
59
64
 
60
- log.setLevel("DEBUG")
61
65
 
62
66
 
63
67
  class PathValidator(BaseModel):
agenta/sdk/types.py CHANGED
@@ -24,8 +24,8 @@ class LLMTokenUsage(BaseModel):
24
24
 
25
25
  class BaseResponse(BaseModel):
26
26
  version: Optional[str] = "2.0"
27
- data: Optional[Union[str, Dict[str, Any]]]
28
- trace: Optional[Dict[str, Any]]
27
+ data: Optional[Union[str, Dict[str, Any]]] = None
28
+ trace: Optional[Dict[str, Any]] = None
29
29
 
30
30
 
31
31
  class DictInput(dict):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: agenta
3
- Version: 0.27.6a1
3
+ Version: 0.27.6a3
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
@@ -147,7 +147,7 @@ agenta/sdk/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
147
147
  agenta/sdk/context/routing.py,sha256=ycUgmJZyWhL4bHjKtUSAsTlt_0Fujr_6OpoaEH1lAN0,683
148
148
  agenta/sdk/context/tracing.py,sha256=UmmW15UFFsvxS0myS6aD9wBk5iNepNlQi4tEQ_ejfYM,96
149
149
  agenta/sdk/decorators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
150
- agenta/sdk/decorators/routing.py,sha256=biG9W7zgZ6V8z9Ca6Oq4NC7m89vO97mnRwmy2vOYook,36987
150
+ agenta/sdk/decorators/routing.py,sha256=mfEus2vU4_J9N_QtZ4ulVLG2zgvvdPX4bRYPXi6NPkA,37098
151
151
  agenta/sdk/decorators/tracing.py,sha256=vL5e6TVX6TQwO0t9raZwnzXHV3vElVT0pHS1vD-vzEo,8523
152
152
  agenta/sdk/litellm/__init__.py,sha256=Bpz1gfHQc0MN1yolWcjifLWznv6GjHggvRGQSpxpihM,37
153
153
  agenta/sdk/litellm/litellm.py,sha256=bzVm-388BleZ2QH_JWpfZ2fB_7-HuoSqdvLo4EDPcEM,8788
@@ -169,7 +169,7 @@ agenta/sdk/tracing/inline.py,sha256=jVIlmDIFSzXr-ofMbGlO8VFnNeiUL4C4yA8soED4AHI,
169
169
  agenta/sdk/tracing/processors.py,sha256=tjoz_uXm_2yD1Ozvz_CnYnsG82R6vmnYpjMhx2ztALs,3117
170
170
  agenta/sdk/tracing/spans.py,sha256=nqUOjjirBxB8Eacv8Qj4Ra_6rknGi3lbJdNyKmk5ODQ,3707
171
171
  agenta/sdk/tracing/tracing.py,sha256=HYuGp5fQozLKWXLXonfCT8pqb7x1gwzzbZk87mfhu3Y,6983
172
- agenta/sdk/types.py,sha256=oEeSUQn4tMzV7dkSuucBC2YlAaxS-7qgkdlT763YfLM,7076
172
+ agenta/sdk/types.py,sha256=7OUoQuhQR3Q51g8fDexhqmgHgj7tgTrdDOZlypA2TwY,7090
173
173
  agenta/sdk/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
174
174
  agenta/sdk/utils/costs.py,sha256=i8C7ud__pThLS55XkN4YW8czXtGeXr2mx7jjcOFeiXg,5955
175
175
  agenta/sdk/utils/debug.py,sha256=DxiCAeXxxrcEZT2CjlNA6BMvujGP4nzQ-rfb-_mLMck,2114
@@ -193,7 +193,7 @@ agenta/templates/simple_prompt/app.py,sha256=kODgF6lhzsaJPdgL5b21bUki6jkvqjWZzWR
193
193
  agenta/templates/simple_prompt/env.example,sha256=g9AE5bYcGPpxawXMJ96gh8oenEPCHTabsiOnfQo3c5k,70
194
194
  agenta/templates/simple_prompt/requirements.txt,sha256=ywRglRy7pPkw8bljmMEJJ4aOOQKrt9FGKULZ-DGkoBU,23
195
195
  agenta/templates/simple_prompt/template.toml,sha256=DQBtRrF4GU8LBEXOZ-GGuINXMQDKGTEG5y37tnvIUIE,60
196
- agenta-0.27.6a1.dist-info/METADATA,sha256=SeThILFKG1GMBGY7QiqIcZ-8vuux7fkalDu6JVh4SA0,31619
197
- agenta-0.27.6a1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
198
- agenta-0.27.6a1.dist-info/entry_points.txt,sha256=PDiu8_8AsL7ibU9v4iNoOKR1S7F2rdxjlEprjM9QOgo,46
199
- agenta-0.27.6a1.dist-info/RECORD,,
196
+ agenta-0.27.6a3.dist-info/METADATA,sha256=F76kgWM2GzNPg2X-O1QDL9UnvSfq6TYMnMZAb8Sg8SQ,31619
197
+ agenta-0.27.6a3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
198
+ agenta-0.27.6a3.dist-info/entry_points.txt,sha256=PDiu8_8AsL7ibU9v4iNoOKR1S7F2rdxjlEprjM9QOgo,46
199
+ agenta-0.27.6a3.dist-info/RECORD,,