Skip to content

make Ollama be the default LLM provider for examples #23

@donbourne

Description

@donbourne

Making the examples default to using Ollama is probably easier for people to use than to require people to get an Azure cloud account.

We might want to keep the dependencies and properties (commented out) in case people want to switch to Azure, and include dependencies / properties for Ollama.

Add ollama dependency to examples:

        <dependency>
            <groupId>dev.langchain4j</groupId>
            <artifactId>langchain4j-ollama</artifactId>
        </dependency>

Remove (or comment out) azure open ai dependency:

        <dependency>
            <groupId>dev.langchain4j</groupId>
            <artifactId>langchain4j-azure-open-ai</artifactId>
        </dependency>

Add properties for the llm configuration in the microprofile-config.properties file with:

dev.langchain4j.plugin.chat-model.class=dev.langchain4j.model.ollama.OllamaChatModel
dev.langchain4j.plugin.chat-model.config.base-url=http://localhost:11434
dev.langchain4j.plugin.chat-model.model-id=llama3.2

Remove (or comment out) azure open ai properties

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions