Skip to content

Conversation

@devatcadam
Copy link

Description

Use await asyncio.gather(*tasks) for async def _async_embed_chunk with semaphore as in LLMEntityRelationExtractor add async def async_embed_query
and self.async_client = ollama.AsyncClient(**kwargs) to use self.async_client = ollama.AsyncClient(**kwargs)

Note

Please provide a description of the work completed in this PR below

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Documentation update
  • Project configuration change

Complexity

Note

Please provide an estimated complexity of this PR of either Low, Medium or High

Complexity: Low

How Has This Been Tested?

  • Unit tests
  • E2E tests
  • Manual tests

Checklist

The following requirements should have been met (depending on the changes in the branch):

  • Documentation has been updated
  • Unit tests have been updated
  • E2E tests have been updated
  • Examples have been updated
  • New files have copyright header
  • CLA (https://neo4j.com/developer/cla/) has been signed
  • CHANGELOG.md updated if appropriate

…edder

# Description

Use await asyncio.gather(*tasks) for async def _async_embed_chunk with semaphore as in LLMEntityRelationExtractor
add async def async_embed_query
and self.async_client = ollama.AsyncClient(**kwargs) to use self.async_client = ollama.AsyncClient(**kwargs)

> **Note**
>
> Please provide a description of the work completed in this PR below
>
>

## Type of Change
- [x] New feature
- [ ] Bug fix
- [ ] Breaking change
- [ ] Documentation update
- [ ] Project configuration change

## Complexity

> **Note**
>
> Please provide an estimated complexity of this PR of either Low, Medium or High
>
>

Complexity: Low

## How Has This Been Tested?
- [ ] Unit tests
- [ ] E2E tests
- [x] Manual tests

# Checklist

The following requirements should have been met (depending on the changes in the branch):

- [x] Documentation has been updated
- [ ] Unit tests have been updated
- [ ] E2E tests have been updated
- [x] Examples have been updated
- [ ] New files have copyright header
- [x] CLA (https://neo4j.com/developer/cla/) has been signed
- [ ] CHANGELOG.md updated if appropriate
@devatcadam devatcadam requested a review from a team as a code owner November 25, 2025 18:44
Copy link
Contributor

@stellasia stellasia left a comment

Choose a reason for hiding this comment

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

Nice one!

For this to work with all embedders, we need to add async_embed_query to the Embedder base class. I'd suggest to add a default implementation that calls the non async method, so that we do not have to work on the actual async implementation for all embedders right now, we will be able to add them progressively.

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.

2 participants