Skip to content

Commit 34aba82

Browse files
committed
feat(integrations): added arxiv + updated readme/llamaparse/cloudinary
1 parent 8c4db9b commit 34aba82

File tree

19 files changed

+2179
-1603
lines changed

19 files changed

+2179
-1603
lines changed

Diff for: README.md

+13-9
Original file line numberDiff line numberDiff line change
@@ -1402,7 +1402,7 @@ output:
14021402
```yaml
14031403
arguments:
14041404
query: string # The search query string
1405-
load_max_docs: integer # Maximum number of documents to load (default: 2)
1405+
load_max_docs: integer # (Optional) Maximum number of documents to load. Default is 2.
14061406
14071407
output:
14081408
documents: list # The documents returned from the Wikipedia search
@@ -1443,10 +1443,13 @@ output:
14431443
```yaml
14441444
setup:
14451445
llamaparse_api_key: string # The API key for Llama Parse
1446+
params: dict # (Optional) Additional parameters for the Llama Parse integration
14461447
14471448
arguments:
1448-
file: string # The base64 encoded file to parse
1449-
filename: string # The filename of the file
1449+
file: string | Array<string> # The base64 encoded file to parse or an array of URLs to load.
1450+
filename: string # (Optional). The filename of the file. Default is a random UUID. Only used if file is a base64 encoded string.
1451+
params: dict # (Optional) Additional parameters for the Llama Parse integration. Overrides the setup parameters.
1452+
base64: boolean # Whether the input file is base64 encoded. Default is false.
14501453
14511454
output:
14521455
documents: list # The parsed data from the document
@@ -1468,20 +1471,21 @@ setup:
14681471
cloudinary_cloud_name: string # Your Cloudinary cloud name
14691472
cloudinary_api_key: string # Your Cloudinary API key
14701473
cloudinary_api_secret: string # Your Cloudinary API secret
1474+
params: dict # (Optional) Additional parameters for the Cloudinary integration
14711475
14721476
arguments:
14731477
file: string # The URL of the file upload. Only available for media_upload method.
1474-
upload_params: dict # Additional parameters for the upload. Only available for media_upload method.
1475-
public_id: string # The public ID for the file. For media_edit method it is MANDATORY. For media_upload method it is optional.
1476-
transformation: list[dict] # The transformations to apply to the file
1477-
return_base64: boolean # Whether to return the file in base64 encoding
1478+
upload_params: dict # (Optional) Additional parameters for the upload. Only available for media_upload method.
1479+
public_id: string # (Optional) The public ID for the file. For media_edit method it is MANDATORY. For media_upload method it is optional. Default is a random UUID.
1480+
transformation: list[dict] # The transformations to apply to the file. Only available for media_edit method.
1481+
return_base64: boolean # Whether to return the file in base64 encoding. Default is false.
14781482
14791483
output:
14801484
url: string # The URL of the uploaded file. Only available for media_upload method.
14811485
meta_data: dict # Additional metadata from the upload response. Only available for media_upload method.
14821486
public_id: string # The public ID of the uploaded file. Only available for media_upload method.
1483-
transformed_url: string # The transformed URL. Only available for media_edit method.
1484-
base64: string # The base64 encoded file. Only available for media_edit method.
1487+
transformed_url: string # (Optional) The transformed URL. Only available for media_edit method.
1488+
base64: string # (Optional) The base64 encoded file if return_base64 is true.
14851489
```
14861490

14871491
</td>

Diff for: agents-api/agents_api/autogen/Tasks.py

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, StrictBool
1010

1111
from .Chat import ChatSettings
12+
from .Common import JinjaTemplate
1213
from .Tools import (
1314
ChosenBash20241022,
1415
ChosenComputer20241022,

Diff for: agents-api/agents_api/autogen/Tools.py

+151-32
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
BaseModel,
1313
ConfigDict,
1414
Field,
15+
RootModel,
1516
StrictBool,
1617
)
1718

@@ -147,6 +148,74 @@ class ApiCallDefUpdate(BaseModel):
147148
"""
148149

149150

151+
class ArxivSearchArguments(BaseModel):
152+
"""
153+
Arguments for Arxiv Search
154+
"""
155+
156+
model_config = ConfigDict(
157+
populate_by_name=True,
158+
)
159+
query: str
160+
"""
161+
The search query for searching with Arxiv
162+
"""
163+
id_list: list[str] | None = None
164+
"""
165+
The list of Arxiv IDs to search with
166+
"""
167+
max_results: Annotated[int, Field(ge=1, le=300000)] = 10
168+
"""
169+
The maximum number of results to return
170+
"""
171+
download_pdf: StrictBool = False
172+
"""
173+
The download the pdf of the results
174+
"""
175+
sort_by: Literal["relevance", "lastUpdatedDate", "submittedDate"] = "relevance"
176+
"""
177+
The sort criterion for the results
178+
"""
179+
sort_order: Literal["ascending", "descending"] = "descending"
180+
"""
181+
The sort order for the results
182+
"""
183+
184+
185+
class ArxivSearchArgumentsUpdate(BaseModel):
186+
"""
187+
Arguments for Arxiv Search
188+
"""
189+
190+
model_config = ConfigDict(
191+
populate_by_name=True,
192+
)
193+
query: str | None = None
194+
"""
195+
The search query for searching with Arxiv
196+
"""
197+
id_list: list[str] | None = None
198+
"""
199+
The list of Arxiv IDs to search with
200+
"""
201+
max_results: Annotated[int, Field(ge=1, le=300000)] = 10
202+
"""
203+
The maximum number of results to return
204+
"""
205+
download_pdf: StrictBool = False
206+
"""
207+
The download the pdf of the results
208+
"""
209+
sort_by: Literal["relevance", "lastUpdatedDate", "submittedDate"] = "relevance"
210+
"""
211+
The sort criterion for the results
212+
"""
213+
sort_order: Literal["ascending", "descending"] = "descending"
214+
"""
215+
The sort order for the results
216+
"""
217+
218+
150219
class BaseChosenToolCall(BaseModel):
151220
"""
152221
The response tool value generated by the model
@@ -200,6 +269,7 @@ class BaseIntegrationDef(BaseModel):
200269
"llama_parse",
201270
"ffmpeg",
202271
"cloudinary",
272+
"arxiv",
203273
]
204274
"""
205275
The provider of the integration
@@ -239,6 +309,7 @@ class BaseIntegrationDefUpdate(BaseModel):
239309
"llama_parse",
240310
"ffmpeg",
241311
"cloudinary",
312+
"arxiv",
242313
]
243314
| None
244315
) = None
@@ -886,6 +957,7 @@ class CreateToolRequest(BaseModel):
886957
| FfmpegIntegrationDef
887958
| CloudinaryUploadIntegrationDef
888959
| CloudinaryEditIntegrationDef
960+
| ArxivIntegrationDef
889961
| None
890962
) = None
891963
"""
@@ -1209,29 +1281,21 @@ class LlamaParseFetchArguments(BaseModel):
12091281
model_config = ConfigDict(
12101282
populate_by_name=True,
12111283
)
1212-
result_format: Literal["text", "markdown"] = "text"
1213-
"""
1214-
The format of the result. Can be "text" or "markdown". Default is "text".
1215-
"""
1216-
num_workers: Annotated[int, Field(ge=1, le=10)] = 2
1217-
"""
1218-
Number of workers for parallel processing. Default is 2, but can be set between 1 and 10.
1219-
"""
1220-
verbose: StrictBool = True
1284+
filename: str | None = None
12211285
"""
1222-
Verbose mode for detailed logging. Default is true.
1286+
File Name. If not provided, a random name will be generated.
12231287
"""
1224-
language: str = "en"
1288+
file: str | list[str]
12251289
"""
1226-
Language of the text. Default is English.
1290+
The base64 string of the file, which can be a single string or a list of strings
12271291
"""
1228-
filename: str | None = None
1292+
params: dict[str, Any] | None = None
12291293
"""
1230-
File Name. If not provided, a random name will be generated.
1294+
Optional upload parameters
12311295
"""
1232-
file: str
1296+
base64: StrictBool = False
12331297
"""
1234-
The base64 string of the file
1298+
The input file is base64
12351299
"""
12361300

12371301

@@ -1243,29 +1307,21 @@ class LlamaParseFetchArgumentsUpdate(BaseModel):
12431307
model_config = ConfigDict(
12441308
populate_by_name=True,
12451309
)
1246-
result_format: Literal["text", "markdown"] = "text"
1247-
"""
1248-
The format of the result. Can be "text" or "markdown". Default is "text".
1249-
"""
1250-
num_workers: Annotated[int, Field(ge=1, le=10)] = 2
1251-
"""
1252-
Number of workers for parallel processing. Default is 2, but can be set between 1 and 10.
1253-
"""
1254-
verbose: StrictBool = True
1310+
filename: str | None = None
12551311
"""
1256-
Verbose mode for detailed logging. Default is true.
1312+
File Name. If not provided, a random name will be generated.
12571313
"""
1258-
language: str = "en"
1314+
file: str | list[str] | None = None
12591315
"""
1260-
Language of the text. Default is English.
1316+
The base64 string of the file, which can be a single string or a list of strings
12611317
"""
1262-
filename: str | None = None
1318+
params: dict[str, Any] | None = None
12631319
"""
1264-
File Name. If not provided, a random name will be generated.
1320+
Optional upload parameters
12651321
"""
1266-
file: str | None = None
1322+
base64: StrictBool = False
12671323
"""
1268-
The base64 string of the file
1324+
The input file is base64
12691325
"""
12701326

12711327

@@ -1333,6 +1389,10 @@ class LlamaParseSetup(BaseModel):
13331389
"""
13341390
The API key for LlamaParse
13351391
"""
1392+
params: dict[str, Any] | None = None
1393+
"""
1394+
Optional upload parameters
1395+
"""
13361396

13371397

13381398
class LlamaParseSetupUpdate(BaseModel):
@@ -1347,6 +1407,10 @@ class LlamaParseSetupUpdate(BaseModel):
13471407
"""
13481408
The API key for LlamaParse
13491409
"""
1410+
params: dict[str, Any] | None = None
1411+
"""
1412+
Optional upload parameters
1413+
"""
13501414

13511415

13521416
class NamedToolChoice(BaseModel):
@@ -1411,6 +1475,7 @@ class PatchToolRequest(BaseModel):
14111475
| FfmpegIntegrationDefUpdate
14121476
| CloudinaryUploadIntegrationDefUpdate
14131477
| CloudinaryEditIntegrationDefUpdate
1478+
| ArxivIntegrationDefUpdate
14141479
| None
14151480
) = None
14161481
"""
@@ -1838,6 +1903,7 @@ class Tool(BaseModel):
18381903
| FfmpegIntegrationDef
18391904
| CloudinaryUploadIntegrationDef
18401905
| CloudinaryEditIntegrationDef
1906+
| ArxivIntegrationDef
18411907
| None
18421908
) = None
18431909
"""
@@ -1931,6 +1997,7 @@ class UpdateToolRequest(BaseModel):
19311997
| FfmpegIntegrationDef
19321998
| CloudinaryUploadIntegrationDef
19331999
| CloudinaryEditIntegrationDef
2000+
| ArxivIntegrationDef
19342001
| None
19352002
) = None
19362003
"""
@@ -2148,6 +2215,58 @@ class WikipediaSearchArgumentsUpdate(BaseModel):
21482215
"""
21492216

21502217

2218+
class ArxivIntegrationDef(BaseIntegrationDef):
2219+
"""
2220+
Arxiv integration definition
2221+
"""
2222+
2223+
model_config = ConfigDict(
2224+
populate_by_name=True,
2225+
)
2226+
provider: Literal["arxiv"] = "arxiv"
2227+
"""
2228+
The provider must be "arxiv"
2229+
"""
2230+
method: str | None = None
2231+
"""
2232+
The specific method of the integration to call
2233+
"""
2234+
setup: Any | None = None
2235+
"""
2236+
The setup parameters for Arxiv
2237+
"""
2238+
arguments: ArxivSearchArguments | None = None
2239+
"""
2240+
The arguments for Arxiv Search
2241+
"""
2242+
2243+
2244+
class ArxivIntegrationDefUpdate(BaseIntegrationDefUpdate):
2245+
"""
2246+
Arxiv integration definition
2247+
"""
2248+
2249+
model_config = ConfigDict(
2250+
populate_by_name=True,
2251+
)
2252+
provider: Literal["arxiv"] = "arxiv"
2253+
"""
2254+
The provider must be "arxiv"
2255+
"""
2256+
method: str | None = None
2257+
"""
2258+
The specific method of the integration to call
2259+
"""
2260+
setup: Any | None = None
2261+
"""
2262+
The setup parameters for Arxiv
2263+
"""
2264+
arguments: ArxivSearchArgumentsUpdate | None = None
2265+
"""
2266+
The arguments for Arxiv Search
2267+
"""
2268+
2269+
21512270
class BaseBrowserbaseIntegrationDef(BaseIntegrationDef):
21522271
"""
21532272
The base definition for a browserbase integration

0 commit comments

Comments
 (0)