Skip to content

Conversation

@CalebMartinUiPath
Copy link
Contributor

add new tool definitions needed for the langchain tools

@github-actions github-actions bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository labels Jan 22, 2026
@CalebMartinUiPath CalebMartinUiPath force-pushed the caleb/jit-ecs-sdk branch 3 times, most recently from 88177a3 to feb7340 Compare January 25, 2026 18:21
Base automatically changed from caleb/jit-ecs-sdk to main January 25, 2026 18:25
@CalebMartinUiPath CalebMartinUiPath force-pushed the caleb/add-tool-definitions branch 2 times, most recently from 2d41733 to 5bdbf83 Compare January 27, 2026 23:46
@CalebMartinUiPath CalebMartinUiPath marked this pull request as ready for review January 29, 2026 08:07
destination_path: str
index_folder_key: str | None = None
index_folder_path: str | None = None
is_ephemeral: bool | None = None

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why optional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as to not break existing code using this. If not provided we will assume it is not an ephemeral index

index_name, folder_key=folder_key, folder_path=folder_path
)
if index and index.in_progress_ingestion():
raise IngestionInProgressException(index_name=index_name)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we checking this? handle the 400

Copy link
Collaborator

@radu-mocanu radu-mocanu Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when developing an agent, we need a reliable way of identifying if the 400 comes from index being ingested or there is some other problem.
there is no other way of handling ingestions (if you don t want to suspend-resume the agent).

check this langchain sample https://github.com/UiPath/uipath-langchain-python/blob/main/samples/RAG-quiz-generator/src/agents/quiz-generator-RAG-agent.py#L121

Copy link

@JeremyReist2 JeremyReist2 Feb 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the link you sent - it checks for ingesting for 25s then gives up - it seems very fragile.

creation of batch transform can fail with 400s for many different reasons (invalid args, failed ingestion, ingestion in progress, etc) - we are not going to check every single one before calling the POST, why do it for already ingesting?

If you need a way to know before calling create_x that the index is ready then why not use the MB event, or have some polling function that only continues before calling creation.

index_name: str,
prompt: Annotated[str, Field(max_length=250000)],
output_columns: list[BatchTransformOutputColumn],
storage_bucket_folder_path_prefix: Annotated[

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

folder path prefix is not only for storage buckets

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@radu-mocanu is it ok to change this? will that break any existing code?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need some more context here. can we have folder path filtering for attachments?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but yes, this would break the method interface.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have been more clear - it was more of a naming nit - folder path prefix can be applicable for one drives, google drives, storage buckets ...

output_columns (list[BatchTransformOutputColumn]): The output columns to add into the csv.
storage_bucket_folder_path_prefix (str): The prefix pattern for filtering files in the storage bucket. Use "*" to include all files. Defaults to "*".
enable_web_search_grounding (Optional[bool]): Whether to enable web search. Defaults to False.
index_id (str): The id of the context index to search in, used in place of name if present

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we can do better encapsulation than having a comment indicate when or when not to use an id. What about overrides? or 2 seperate functions

Copy link
Collaborator

@radu-mocanu radu-mocanu Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JeremyReist2 this is the pattern we have in place for other methods as well

however it is not a good pattern to have silent precedence (id over name). let s validate the arguments as we do in the add_to_index method

Copy link

@JeremyReist2 JeremyReist2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few comments

@CalebMartinUiPath CalebMartinUiPath force-pushed the caleb/add-tool-definitions branch from 838c804 to 83e6681 Compare January 30, 2026 00:12
Copy link

@JeremyReist2 JeremyReist2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving to unblock @CalebMartinUiPath - I disagree with pattern in use for calling another API to throw ingestion errors in create calls - create should only be called after ingestion and if you need to poll or wait for MB before calling create then do so.

Forcing us to remember in every create_x call to check for ingestion and throw that error is a bad pattern, adds duplication, and will break down the road when someone forgets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants