Skip to content

feat: context grounding create index and ingest data #239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2025

Conversation

radu-mocanu
Copy link
Contributor

@radu-mocanu radu-mocanu commented Apr 7, 2025

  • context grounding create index and ingest data
    usage sample:
uipath = UiPathSDK()
index = uipath.context_grounding.get_or_create_index("test-radu", description="Test Radu Index", storage_bucket_name="radu-sb")
uipath.buckets.upload(
    bucket_name="radu-sb",
    blob_file_path="ion-creanga-povestea-lui-harap-alb.pdf",
    content_type="application/pdf",
    source_path="C:\\Users\\radu.mocanu\\Downloads\\ion-creanga-povestea-lui-harap-alb.pdf")
uipath.context_grounding.ingest_data(index)
no_of_retries = 5
results = []
while no_of_retries:
    try:
        results = uipath.context_grounding.search(
        "test-radu",
        query="Cine e Harap Alb?",
        number_of_results=5)
        break
    except IngestionInProgress as ex:
        print(ex)
        no_of_retries -= 1
        sleep(3)
print(results)
uipath.context_grounding.delete_index(index)

@radu-mocanu radu-mocanu self-assigned this Apr 7, 2025
@radu-mocanu radu-mocanu force-pushed the feat/context-grounding branch 2 times, most recently from 7f5871d to 5b386a3 Compare April 7, 2025 18:25
@radu-mocanu radu-mocanu changed the title [WIP] feat: context grounding add create index and ingest data [WIP] feat: context grounding create index and ingest data Apr 8, 2025
@radu-mocanu radu-mocanu force-pushed the feat/context-grounding branch 2 times, most recently from 74ca079 to ac4f669 Compare April 8, 2025 11:19
@radu-mocanu radu-mocanu changed the title [WIP] feat: context grounding create index and ingest data feat: context grounding create index and ingest data Apr 8, 2025
@radu-mocanu radu-mocanu requested a review from cristipufu April 8, 2025 11:20
@radu-mocanu radu-mocanu force-pushed the feat/context-grounding branch 3 times, most recently from 5e56046 to d37fb46 Compare April 8, 2025 11:40
@radu-mocanu radu-mocanu enabled auto-merge April 8, 2025 11:43
@radu-mocanu radu-mocanu disabled auto-merge April 8, 2025 12:32
@radu-mocanu radu-mocanu force-pushed the feat/context-grounding branch from d37fb46 to 628fa5a Compare April 8, 2025 12:32
@radu-mocanu radu-mocanu force-pushed the feat/context-grounding branch 2 times, most recently from 6caed07 to 998e445 Compare April 8, 2025 12:36
@radu-mocanu radu-mocanu force-pushed the feat/context-grounding branch from 998e445 to 23a8f77 Compare April 8, 2025 12:39
@gheorghitahurmuz gheorghitahurmuz merged commit 2e6fb34 into main Apr 8, 2025
4 checks passed
@gheorghitahurmuz gheorghitahurmuz deleted the feat/context-grounding branch April 8, 2025 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants