Skip to content

feat: Add Support for Ollama#28

Merged
Ganeshsivakumar merged 1 commit intoGaneshsivakumar:mainfrom
twosom:integrate-ollama
May 7, 2025
Merged

feat: Add Support for Ollama#28
Ganeshsivakumar merged 1 commit intoGaneshsivakumar:mainfrom
twosom:integrate-ollama

Conversation

@twosom
Copy link
Copy Markdown
Contributor

@twosom twosom commented May 6, 2025

Description

This PR contains these changes

  • add support for Ollama with text generation
  • add support for Ollama with embedding

fixes #12

Usage Example

text-generation

OllamaModelOptions modelOptions = OllamaModelOptions.builder()
        .modelName("phi4:14b")
        .build();

LangchainModelHandler handler = new LangchainModelHandler(modelOptions, prompt);

embedding

final OllamaEmbeddingModelOptions embeddingOptions = OllamaEmbeddingModelOptions.builder()
                .modelName("nomic-embed-text:latest")
                .build();

EmbeddingModelHandler handler = new EmbeddingModelHandler(embeddingOptions);

Copy link
Copy Markdown
Owner

@Ganeshsivakumar Ganeshsivakumar left a comment

Choose a reason for hiding this comment

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

Thanks for your work, @twosom ! The changes look great, we're are good to merge

@Ganeshsivakumar Ganeshsivakumar merged commit e98c043 into Ganeshsivakumar:main May 7, 2025
1 check passed
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.

Integrate Ollama

2 participants