### Configure Micronaut LangChain4j Qdrant Embedding Store Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Provides example configurations for setting up the Qdrant embedding store, including host, port, and collection name. These settings define how embeddings are stored and accessed in Qdrant. ```Properties langchain4j.qdrant.embedding-store.host=localhost langchain4j.qdrant.embedding-store.port=6334 langchain4j.qdrant.embedding-store.collection-name=mycollection ``` ```YAML # Omitt the following 2 properties if you use Test resources langchain4j.qdrant.embedding-store.host: localhost langchain4j.qdrant.embedding-store.port: 6334 ``` -------------------------------- ### Configure Micronaut LangChain4j VertexAI Gemini Model Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Provides example configurations for setting up the VertexAI Gemini chat model, including model name, project ID, and location. These settings are crucial for connecting to the VertexAI service. ```Properties langchain4j.vertex-ai-gemini.model-name=YOUR_MODEL langchain4j.vertex-ai-gemini.project=YOUR_PROJECT langchain4j.vertex-ai-gemini.location=YOUR_LOCATION ``` ```YAML langchain4j.vertex-ai-gemini.model-name: YOUR_MODEL langchain4j.vertex-ai-gemini.project: YOUR_PROJECT langchain4j.vertex-ai-gemini.location: YOUR_LOCATION ``` ```HOCON "langchain4j.vertex-ai-gemini.model-name"="YOUR_MODEL" "langchain4j.vertex-ai-gemini.project"="YOUR_PROJECT" "langchain4j.vertex-ai-gemini.location"="YOUR_LOCATION" ``` ```Groovy/Kotlin DSL langchain4j.vertexAiGemini.modelName = "YOUR_MODEL" langchain4j.vertexAiGemini.project = "YOUR_PROJECT" langchain4j.vertexAiGemini.location = "YOUR_LOCATION" ``` ```HOCON { "langchain4j.vertex-ai-gemini.model-name" = "YOUR_MODEL" "langchain4j.vertex-ai-gemini.project" = "YOUR_PROJECT" "langchain4j.vertex-ai-gemini.location" = "YOUR_LOCATION" } ``` ```JSON { "langchain4j.vertex-ai-gemini.model-name": "YOUR_MODEL", "langchain4j.vertex-ai-gemini.project": "YOUR_PROJECT", "langchain4j.vertex-ai-gemini.location": "YOUR_LOCATION" } ``` -------------------------------- ### Configure Micronaut LangChain4j Redis Embedding Store Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Provides example configurations for setting up the Redis embedding store, including host, port, and embedding dimension. These settings define how embeddings are stored and accessed in Redis. ```Properties langchain4j.redis.embedding-store.host=localhost langchain4j.redis.embedding-store.port=6379 langchain4j.redis.embedding-stores.default.dimension=384 ``` ```YAML langchain4j.redis.embedding-store.host: localhost langchain4j.redis.embedding-store.port: 6379 langchain4j.redis.embedding-stores.default.dimension: 384 ``` ```HOCON "langchain4j.redis.embedding-store.host"="localhost" "langchain4j.redis.embedding-store.port"=6379 "langchain4j.redis.embedding-stores.default.dimension"=384 ``` ```HOCON langchain4j.redis.embeddingStore.host = "localhost" langchain4j.redis.embeddingStore.port = 6379 langchain4j.redis.embeddingStores.default.dimension = 384 ``` ```HOCON { "langchain4j.redis.embedding-store.host" = "localhost" "langchain4j.redis.embedding-store.port" = 6379 "langchain4j.redis.embedding-stores.default.dimension" = 384 } ``` ```JSON { "langchain4j.redis.embedding-store.host": "localhost", "langchain4j.redis.embedding-store.port": 6379, "langchain4j.redis.embedding-stores.default.dimension": 384 } ``` -------------------------------- ### Configure Micronaut LangChain4j Elasticsearch Embedding Store Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Provides example configurations for connecting to Elasticsearch and setting the default embedding dimension. These settings are required for the embedding store functionality. ```Properties elasticsearch.httpHosts=http://localhost:9200,http://127.0.0.2:9200 langchain4j.elasticsearch.embedding-stores.default.dimension=384 ``` ```YAML elasticsearch.httpHosts: "http://localhost:9200,http://127.0.0.2:9200" langchain4j.elasticsearch.embedding-stores.default.dimension: 384 ``` ```HOCON "elasticsearch.httpHosts"="http://localhost:9200,http://127.0.0.2:9200" "langchain4j.elasticsearch.embedding-stores.default.dimension"=384 ``` ```Groovy/Kotlin DSL elasticsearch.httpHosts = "http://localhost:9200,http://127.0.0.2:9200" langchain4j.elasticsearch.embeddingStores.default.dimension = 384 ``` ```HOCON { "elasticsearch.httpHosts" = "http://localhost:9200,http://127.0.0.2:9200" "langchain4j.elasticsearch.embedding-stores.default.dimension" = 384 } ``` ```JSON { "elasticsearch.httpHosts": "http://localhost:9200,http://127.0.0.2:9200", "langchain4j.elasticsearch.embedding-stores.default.dimension": 384 } ``` -------------------------------- ### Configure Micronaut LangChain4j PGVector Embedding Store Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Provides example configurations for setting up the PGVector embedding store, including database dialect, table name, embedding dimension, and Test Resources for PostgreSQL. These settings define how embeddings are stored and accessed. ```Properties datasources.default.dialect=postgres langchain4j.pgvector.embedding-stores.default.table=mytable langchain4j.pgvector.embedding-stores.default.dimension=384 test-resources.containers.postgres.image-name=pgvector/pgvector:pg16 ``` ```YAML datasources.default.dialect: postgres langchain4j.pgvector.embedding-stores.default.table: "mytable" langchain4j.pgvector.embedding-stores.default.dimension: 384 # Add this if you plan to use testresources test-resources.containers.postgres.image-name: pgvector/pgvector:pg16 ``` ```HOCON "datasources.default.dialect"="postgres" "langchain4j.pgvector.embedding-stores.default.table"="mytable" "langchain4j.pgvector.embedding-stores.default.dimension"=384 "test-resources.containers.postgres.image-name"="pgvector/pgvector:pg16" ``` ```HOCON datasources.default.dialect = "postgres" langchain4j.pgvector.embeddingStores.default.table = "mytable" langchain4j.pgvector.embeddingStores.default.dimension = 384 testResources.containers.postgres.imageName = "pgvector/pgvector:pg16" ``` ```HOCON { "datasources.default.dialect" = "postgres" "langchain4j.pgvector.embedding-stores.default.table" = "mytable" "langchain4j.pgvector.embedding-stores.default.dimension" = 384 "test-resources.containers.postgres.image-name" = "pgvector/pgvector:pg16" } ``` ```JSON { "datasources.default.dialect": "postgres", "langchain4j.pgvector.embedding-stores.default.table": "mytable", "langchain4j.pgvector.embedding-stores.default.dimension": 384, "test-resources.containers.postgres.image-name": "pgvector/pgvector:pg16" } ``` -------------------------------- ### Configure OpenAI API Key in Micronaut LangChain4j Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Demonstrates how to set the `langchain4j.open-ai.api-key` for Micronaut LangChain4j to connect to OpenAI. Examples are provided for various configuration formats including properties, YAML, HOCON, Groovy DSL, and JSON. ```Java Properties langchain4j.open-ai.api-key=YOUR_KEY ``` ```YAML langchain4j.open-ai.api-key: YOUR_KEY ``` ```HOCON "langchain4j.open-ai.api-key"="YOUR_KEY" ``` ```Groovy/Kotlin DSL langchain4j.openAi.apiKey = "YOUR_KEY" ``` ```HOCON JSON { "langchain4j.open-ai.api-key" = "YOUR_KEY" } ``` ```JSON { "langchain4j.open-ai.api-key": "YOUR_KEY" } ``` -------------------------------- ### Configure Google AI Gemini API Key in Micronaut LangChain4j Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Demonstrates how to set the `langchain4j.google-ai-gemini.api-key` for Micronaut LangChain4j to connect to Google AI Gemini. Examples are provided for various configuration formats including properties, YAML, HOCON, Groovy DSL, and JSON. ```Java Properties langchain4j.google-ai-gemini.api-key=YOUR_API_KEY ``` ```YAML langchain4j.google-ai-gemini.api-key: YOUR_API_KEY ``` ```HOCON "langchain4j.google-ai-gemini.api-key"="YOUR_API_KEY" ``` ```Groovy/Kotlin DSL langchain4j.googleAiGemini.apiKey = "YOUR_API_KEY" ``` ```HOCON JSON { "langchain4j.google-ai-gemini.api-key" = "YOUR_API_KEY" } ``` ```JSON { "langchain4j.google-ai-gemini.api-key": "YOUR_API_KEY" } ``` -------------------------------- ### Configure Qdrant Embedding Store (JSON) Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Provides the configuration for the Qdrant embedding store host, port, and collection name in standard JSON format, suitable for application.json. ```JSON { "langchain4j.qdrant.embedding-store.host": "localhost", "langchain4j.qdrant.embedding-store.port": 6334, "langchain4j.qdrant.embedding-store.collection-name": "mycollection" } ``` -------------------------------- ### Configure VertexAI Endpoints and Project in Micronaut LangChain4j Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Demonstrates how to set various configuration properties for Micronaut LangChain4j to connect to Google VertexAI, including endpoint, model name, project, location, and publisher. Examples are provided for various configuration formats. ```Java Properties langchain4j.vertex-ai.endpoint=YOUR_ENDPOINT langchain4j.vertex-ai.model-name=YOUR_MODEL langchain4j.vertex-ai.project=YOUR_PROJECT langchain4j.vertex-ai.location=YOUR_LOCATION langchain4j.vertex-ai.publisher=YOUR_PUBLISHER ``` ```YAML langchain4j.vertex-ai.endpoint: YOUR_ENDPOINT langchain4j.vertex-ai.model-name: YOUR_MODEL langchain4j.vertex-ai.project: YOUR_PROJECT langchain4j.vertex-ai.location: YOUR_LOCATION langchain4j.vertex-ai.publisher: YOUR_PUBLISHER ``` ```HOCON "langchain4j.vertex-ai.endpoint"="YOUR_ENDPOINT" "langchain4j.vertex-ai.model-name"="YOUR_MODEL" "langchain4j.vertex-ai.project"="YOUR_PROJECT" "langchain4j.vertex-ai.location"="YOUR_LOCATION" "langchain4j.vertex-ai.publisher"="YOUR_PUBLISHER" ``` ```Groovy/Kotlin DSL langchain4j.vertexAi.endpoint = "YOUR_ENDPOINT" langchain4j.vertexAi.modelName = "YOUR_MODEL" langchain4j.vertexAi.project = "YOUR_PROJECT" langchain4j.vertexAi.location = "YOUR_LOCATION" langchain4j.vertexAi.publisher = "YOUR_PUBLISHER" ``` ```HOCON JSON { "langchain4j.vertex-ai.endpoint" = "YOUR_ENDPOINT", "langchain4j.vertex-ai.model-name" = "YOUR_MODEL", "langchain4j.vertex-ai.project" = "YOUR_PROJECT", "langchain4j.vertex-ai.location" = "YOUR_LOCATION", "langchain4j.vertex-ai.publisher" = "YOUR_PUBLISHER" } ``` ```JSON { "langchain4j.vertex-ai.endpoint": "YOUR_ENDPOINT", "langchain4j.vertex-ai.model-name": "YOUR_MODEL", "langchain4j.vertex-ai.project": "YOUR_PROJECT", "langchain4j.vertex-ai.location": "YOUR_LOCATION", "langchain4j.vertex-ai.publisher": "YOUR_PUBLISHER" } ``` -------------------------------- ### Add HuggingFace LangChain4j Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Adds the Micronaut LangChain4j HuggingFace module dependency to your project, enabling integration with HuggingFace models. ```Gradle implementation("io.micronaut.langchain4j:micronaut-langchain4j-hugging-face") ``` ```Maven io.micronaut.langchain4j micronaut-langchain4j-hugging-face ``` -------------------------------- ### Add Ollama LangChain4j Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Adds the Micronaut LangChain4j Ollama module dependency to your project, enabling integration with local Ollama models. ```Gradle implementation("io.micronaut.langchain4j:micronaut-langchain4j-ollama") ``` ```Maven io.micronaut.langchain4j micronaut-langchain4j-ollama ``` -------------------------------- ### Add MistralAI LangChain4j Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Adds the Micronaut LangChain4j MistralAI module dependency to your project, enabling integration with MistralAI models. ```Gradle implementation("io.micronaut.langchain4j:micronaut-langchain4j-mistralai") ``` ```Maven io.micronaut.langchain4j micronaut-langchain4j-mistralai ``` -------------------------------- ### Add Azure LangChain4j Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Adds the Micronaut LangChain4j Azure module dependency to your project, enabling integration with Azure OpenAI services. ```Gradle implementation("io.micronaut.langchain4j:micronaut-langchain4j-azure") ``` ```Maven io.micronaut.langchain4j micronaut-langchain4j-azure ``` -------------------------------- ### Configure MistralAI Chat Model Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Configures the API key for the MistralAI chat model within Micronaut LangChain4j. Replace the placeholder with your actual MistralAI API key. ```Properties langchain4j.mistral-ai.api-key=YOUR_KEY ``` ```YAML langchain4j.mistral-ai.api-key: YOUR_KEY ``` ```HOCON "langchain4j.mistral-ai.api-key"="YOUR_KEY" ``` ```Groovy langchain4j.mistralAi.apiKey = "YOUR_KEY" ``` ```HOCON-JSON { "langchain4j.mistral-ai.api-key" = "YOUR_KEY" } ``` ```JSON { "langchain4j.mistral-ai.api-key": "YOUR_KEY" } ``` -------------------------------- ### Configure Ollama Chat Model Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Configures the base URL for the Ollama chat model within Micronaut LangChain4j. Replace the placeholder with your Ollama instance URL. ```Properties langchain4j.ollama.base-url=YOUR_URL ``` ```YAML langchain4j.ollama.base-url: YOUR_URL ``` ```HOCON "langchain4j.ollama.base-url"="YOUR_URL" ``` ```Groovy langchain4j.ollama.baseUrl = "YOUR_URL" ``` ```HOCON-JSON { "langchain4j.ollama.base-url" = "YOUR_URL" } ``` ```JSON { "langchain4j.ollama.base-url": "YOUR_URL" } ``` -------------------------------- ### Add Qdrant Test Resources Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Includes the Testcontainers and Test Resources dependency for Qdrant, facilitating local testing and development by providing a managed Qdrant instance for integration tests. ```Gradle Groovy testResourcesService("io.micronaut.langchain4j:micronaut-langchain4j-qdrant-testresource") ``` ```Maven XML io.micronaut.langchain4j micronaut-langchain4j-qdrant-testresource testResourcesService ``` -------------------------------- ### Add Micronaut Langchain4j Ollama Module Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide This snippet illustrates how to add the Micronaut Langchain4j Ollama module dependency. This module enables integration with Ollama, a local large language model, for quick start and local development. ```Gradle implementation("io.micronaut.langchain4j:micronaut-langchain4j-ollama") ``` ```Maven io.micronaut.langchain4j micronaut-langchain4j-ollama ``` -------------------------------- ### Add Bedrock LangChain4j Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Adds the Micronaut LangChain4j Bedrock module dependency to your project, enabling integration with AWS Bedrock services. ```Gradle implementation("io.micronaut.langchain4j:micronaut-langchain4j-bedrock") ``` ```Maven io.micronaut.langchain4j micronaut-langchain4j-bedrock ``` -------------------------------- ### Configure HuggingFace Chat Model Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Configures the access token for the HuggingFace chat model within Micronaut LangChain4j. Replace the placeholder with your actual HuggingFace access token. ```Properties langchain4j.hugging-face.access-token=YOUR_ACCESS_TOKEN ``` ```YAML langchain4j.hugging-face.access-token: YOUR_ACCESS_TOKEN ``` ```HOCON "langchain4j.hugging-face.access-token"="YOUR_ACCESS_TOKEN" ``` ```Groovy langchain4j.huggingFace.accessToken = "YOUR_ACCESS_TOKEN" ``` ```HOCON-JSON { "langchain4j.hugging-face.access-token" = "YOUR_ACCESS_TOKEN" } ``` ```JSON { "langchain4j.hugging-face.access-token": "YOUR_ACCESS_TOKEN" } ``` -------------------------------- ### Add OpenSearch LangChain4j Store Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Add the necessary dependency for the Micronaut LangChain4j OpenSearch embedding store. This dependency enables integration with OpenSearch for storing embeddings. ```Gradle implementation("io.micronaut.langchain4j:micronaut-langchain4j-store-opensearch") ``` ```Maven io.micronaut.langchain4j micronaut-langchain4j-store-opensearch ``` -------------------------------- ### Add Micronaut LangChain4j VertexAI Gemini Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Specifies the necessary build dependency for integrating VertexAI Gemini with Micronaut LangChain4j. This dependency enables the use of Gemini models within your application. ```Gradle implementation("io.micronaut.langchain4j:micronaut-langchain4j-vertexai-gemini") ``` ```Maven io.micronaut.langchain4j micronaut-langchain4j-vertexai-gemini ``` -------------------------------- ### Configure Qdrant Embedding Store (Standard Properties) Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Configures the Qdrant embedding store host, port, and collection name using standard Java properties format with camelCase keys, typically found in application.properties. ```Properties langchain4j.qdrant.embeddingStore.host = "localhost" langchain4j.qdrant.embeddingStore.port = 6334 langchain4j.qdrant.embeddingStore.collectionName = "mycollection" ``` -------------------------------- ### Add Neo4j LangChain4j Store Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Add the necessary dependency for the Micronaut LangChain4j Neo4j embedding store. This dependency enables integration with Neo4j for storing embeddings. ```Gradle implementation("io.micronaut.langchain4j:micronaut-langchain4j-store-neo4j") ``` ```Maven io.micronaut.langchain4j micronaut-langchain4j-store-neo4j ``` -------------------------------- ### Configure Azure OpenAI Chat Model Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Configures the API key and endpoint for the Azure OpenAI chat model within Micronaut LangChain4j. Replace placeholders with your actual Azure credentials. ```Properties langchain4j.azure-open-ai.api-key=YOUR_KEY langchain4j.azure-open-ai.endpoint=YOUR_ENDPOINT ``` ```YAML langchain4j.azure-open-ai.api-key: YOUR_KEY langchain4j.azure-open-ai.endpoint: YOUR_ENDPOINT ``` ```HOCON "langchain4j.azure-open-ai.api-key"="YOUR_KEY" "langchain4j.azure-open-ai.endpoint"="YOUR_ENDPOINT" ``` ```Groovy langchain4j.azureOpenAi.apiKey = "YOUR_KEY" langchain4j.azureOpenAi.endpoint = "YOUR_ENDPOINT" ``` ```HOCON-JSON { "langchain4j.azure-open-ai.api-key" = "YOUR_KEY" "langchain4j.azure-open-ai.endpoint" = "YOUR_ENDPOINT" } ``` ```JSON { "langchain4j.azure-open-ai.api-key": "YOUR_KEY", "langchain4j.azure-open-ai.endpoint": "YOUR_ENDPOINT" } ``` -------------------------------- ### Add Oracle LangChain4j Store Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Add the necessary dependency for the Micronaut LangChain4j Oracle embedding store. This dependency enables integration with Oracle databases for storing embeddings. ```Gradle implementation("io.micronaut.langchain4j:micronaut-langchain4j-store-oracle") ``` ```Maven io.micronaut.langchain4j micronaut-langchain4j-store-oracle ``` -------------------------------- ### Configure Qdrant Embedding Store (HOCON JSON-like) Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Specifies the Qdrant embedding store host, port, and collection name using a HOCON format that resembles JSON but uses equals signs for assignments. ```HOCON { "langchain4j.qdrant.embedding-store.host" = "localhost" "langchain4j.qdrant.embedding-store.port" = 6334 "langchain4j.qdrant.embedding-store.collection-name" = "mycollection" } ``` -------------------------------- ### Add Micronaut Langchain4j Core Module Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide This snippet demonstrates how to include the core Micronaut Langchain4j module dependency. The core module provides fundamental functionalities and abstractions for integrating Langchain4j with Micronaut applications. ```Gradle implementation("io.micronaut.langchain4j:micronaut-langchain4j-core") ``` ```Maven io.micronaut.langchain4j micronaut-langchain4j-core ``` -------------------------------- ### Add VertexAI Dependency for Micronaut LangChain4j Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Instructions to add the `micronaut-langchain4j-vertexai` dependency to a Micronaut project using either Gradle or Maven. This dependency is necessary for integrating and utilizing Google VertexAI services. ```Gradle implementation("io.micronaut.langchain4j:micronaut-langchain4j-vertexai") ``` ```Maven XML io.micronaut.langchain4j micronaut-langchain4j-vertexai ``` -------------------------------- ### Configure Micronaut LangChain4j Neo4j Embedding Store Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Configure the Neo4j embedding store properties for Micronaut LangChain4j, including the Neo4j URI and the embedding dimension. Ensure the Neo4j driver is properly set up. ```Properties neo4j.uri=bolt://localhost langchain4j.neo4j.embedding-stores.default.dimension=384 ``` ```YAML neo4j.uri: bolt://localhost langchain4j.neo4j.embedding-stores.default.dimension: 384 ``` ```HOCON (Quoted Keys) "neo4j.uri"="bolt://localhost" "langchain4j.neo4j.embedding-stores.default.dimension"=384 ``` ```HOCON (Unquoted Keys) neo4j.uri = "bolt://localhost" langchain4j.neo4j.embeddingStores.default.dimension = 384 ``` ```HOCON (Object) { "neo4j.uri" = "bolt://localhost" "langchain4j.neo4j.embedding-stores.default.dimension" = 384 } ``` ```JSON { "neo4j.uri": "bolt://localhost", "langchain4j.neo4j.embedding-stores.default.dimension": 384 } ``` -------------------------------- ### Configure Micronaut LangChain4j OpenSearch Embedding Store Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Configure the OpenSearch embedding store properties for Micronaut LangChain4j, including the OpenSearch REST client hosts and the embedding dimension. Ensure the OpenSearch client is properly set up. ```Properties micronaut.opensearch.rest-client.http-hosts=http://localhost:9200,http://127.0.0.2:9200 langchain4j.opensearch.embedding-stores.default.dimension=384 ``` ```YAML micronaut.opensearch.rest-client.http-hosts: "http://localhost:9200,http://127.00.2:9200" langchain4j.opensearch.embedding-stores.default.dimension: 384 ``` ```HOCON (Quoted Keys) "micronaut.opensearch.rest-client.http-hosts"="http://localhost:9200,http://127.0.0.2:9200" "langchain4j.opensearch.embedding-stores.default.dimension"=384 ``` ```HOCON (Unquoted Keys) micronaut.opensearch.restClient.httpHosts = "http://localhost:9200,http://127.0.0.2:9200" langchain4j.opensearch.embeddingStores.default.dimension = 384 ``` ```HOCON (Object) { "micronaut.opensearch.rest-client.http-hosts" = "http://localhost:9200,http://127.0.0.2:9200" "langchain4j.opensearch.embedding-stores.default.dimension" = 384 } ``` ```JSON { "micronaut.opensearch.rest-client.http-hosts": "http://localhost:9200,http://127.0.0.2:9200", "langchain4j.opensearch.embedding-stores.default.dimension": 384 } ``` -------------------------------- ### Add Micronaut LangChain4j Elasticsearch Store Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Specifies the necessary build dependency for integrating Elasticsearch as an embedding store with Micronaut LangChain4j. This enables storing and retrieving embeddings using Elasticsearch. ```Gradle implementation("io.micronaut.langchain4j:micronaut-langchain4j-store-elasticsearch") ``` ```Maven io.micronaut.langchain4j micronaut-langchain4j-store-elasticsearch ``` -------------------------------- ### Configure Qdrant Collection Name (YAML) Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Sets the Qdrant embedding store collection name using a simple YAML or properties-like syntax, often found in application.yml or application.properties. ```YAML langchain4j.qdrant.embedding-store.collection-name: mycollection ``` -------------------------------- ### Configure Bedrock Llama Chat Model Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Configures the API key for the AWS Bedrock Llama chat model within Micronaut LangChain4j. Replace the placeholder with your actual Bedrock API key. ```Properties langchain4j.bedrock-llama.api-key=YOUR_KEY ``` ```YAML langchain4j.bedrock-llama.api-key: YOUR_KEY ``` ```HOCON "langchain4j.bedrock-llama.api-key"="YOUR_KEY" ``` ```Groovy langchain4j.bedrockLlama.apiKey = "YOUR_KEY" ``` ```HOCON-JSON { "langchain4j.bedrock-llama.api-key" = "YOUR_KEY" } ``` ```JSON { "langchain4j.bedrock-llama.api-key": "YOUR_KEY" } ``` -------------------------------- ### Add OpenAI Dependency for Micronaut LangChain4j Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Instructions to add the `micronaut-langchain4j-openai` dependency to a Micronaut project using either Gradle or Maven. This dependency is required to integrate and utilize OpenAI services within your application. ```Gradle implementation("io.micronaut.langchain4j:micronaut-langchain4j-openai") ``` ```Maven XML io.micronaut.langchain4j micronaut-langchain4j-openai ``` -------------------------------- ### Add Micronaut Langchain4j Annotation Processor Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide This snippet shows how to add the necessary annotation processor dependency for Micronaut Langchain4j. This processor is crucial for enabling compile-time enhancements and features provided by the library. ```Gradle annotationProcessor("io.micronaut.langchain4j:micronaut-langchain4j-processor") ``` ```Maven io.micronaut.langchain4j micronaut-langchain4j-processor ``` -------------------------------- ### Add Micronaut JDBC Hikari Connection Pool Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Add a JDBC connection pool dependency, such as Hikari, for Oracle database connectivity. This is required for managing database connections efficiently. ```Gradle runtimeOnly("io.micronaut.sql:micronaut-jdbc-hikari") ``` ```Maven io.micronaut.sql micronaut-jdbc-hikari runtime ``` -------------------------------- ### Add Micronaut Langchain4j Ollama Test Resources Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide This snippet shows how to add the test resources integration for the Ollama module. This dependency is used to facilitate testing with Ollama by providing test-specific resources and configurations. ```Gradle testResourcesService("io.micronaut.langchain4j:micronaut-langchain4j-ollama-testresource") ``` ```Maven io.micronaut.langchain4j micronaut-langchain4j-ollama-testresource testResourcesService ``` -------------------------------- ### Add Google AI Gemini Dependency for Micronaut LangChain4j Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Instructions to add the `micronaut-langchain4j-googleai-gemini` dependency to a Micronaut project using either Gradle or Maven. This dependency is essential for integrating and utilizing Google AI Gemini services. ```Gradle implementation("io.micronaut.langchain4j:micronaut-langchain4j-googleai-gemini") ``` ```Maven XML io.micronaut.langchain4j micronaut-langchain4j-googleai-gemini ``` -------------------------------- ### Configure Qdrant Embedding Store (HOCON Quoted Keys) Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Defines the Qdrant embedding store host, port, and collection name using HOCON syntax with quoted keys and equals signs, common in some configuration file formats. ```HOCON "langchain4j.qdrant.embedding-store.host"="localhost" "langchain4j.qdrant.embedding-store.port"=6334 "langchain4j.qdrant.embedding-store.collection-name"="mycollection" ``` -------------------------------- ### Add JDBC Connection Pool Dependency (Hikari) Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Includes a JDBC connection pool, such as Hikari, which is required for database connectivity when using PGVector. This ensures efficient and reliable database connections. ```Gradle Groovy runtimeOnly("io.micronaut.sql:micronaut-jdbc-hikari") ``` ```Maven XML io.micronaut.sql micronaut-jdbc-hikari runtime ``` -------------------------------- ### Add Micronaut LangChain4j Redis Store Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Adds the necessary dependency to integrate Redis as an embedding store with Micronaut LangChain4j, enabling the application to use Redis for storing and retrieving embeddings. ```Gradle Groovy implementation("io.micronaut.langchain4j:micronaut-langchain4j-store-redis") ``` ```Maven XML io.micronaut.langchain4j micronaut-langchain4j-store-redis ``` -------------------------------- ### Add Micronaut LangChain4j Qdrant Store Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Adds the necessary dependency to integrate Qdrant as an embedding store with Micronaut LangChain4j, allowing the application to store and retrieve embeddings in a Qdrant vector database. ```Gradle Groovy implementation("io.micronaut.langchain4j:micronaut-langchain4j-store-qdrant") ``` ```Maven XML io.micronaut.langchain4j micronaut-langchain4j-store-qdrant ``` -------------------------------- ### Add Micronaut LangChain4j PGVector Store Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Adds the necessary dependency to integrate PGVector as an embedding store with Micronaut LangChain4j, allowing the application to store and retrieve embeddings in a PostgreSQL database. ```Gradle Groovy implementation("io.micronaut.langchain4j:micronaut-langchain4j-store-pgvector") ``` ```Maven XML io.micronaut.langchain4j micronaut-langchain4j-store-pgvector ``` -------------------------------- ### Add Micronaut LangChain4j MongoDB Atlas Store Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Specifies the necessary build dependency for integrating MongoDB Atlas as an embedding store with Micronaut Langchain4j. This enables storing and retrieving embeddings using MongoDB Atlas. ```Gradle implementation("io.micronaut.langchain4j:micronaut-langchain4j-store-mongodb-atlas") ``` ```Maven io.micronaut.langchain4j micronaut-langchain4j-store-mongodb-atlas ``` -------------------------------- ### Configure Micronaut LangChain4j Oracle Embedding Store Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Configure the Oracle embedding store properties for Micronaut LangChain4j, including the database dialect, table name, and table creation option. Ensure a JDBC connection pool is configured. ```Properties datasources.default.dialect=oracle langchain4j.oracle.embedding-stores.default.table=test langchain4j.oracle.embedding-stores.default.table.create-option=create_if_not_exists ``` ```YAML datasources.default.dialect: oracle langchain4j.oracle.embedding-stores.default.table: test langchain4j.oracle.embedding-stores.default.table.create-option: create_if_not_exists ``` ```HOCON (Quoted Keys) "datasources.default.dialect"="oracle" "langchain4j.oracle.embedding-stores.default.table"="test" "langchain4j.oracle.embedding-stores.default.table.create-option"="create_if_not_exists" ``` ```HOCON (Unquoted Keys) datasources.default.dialect = "oracle" langchain4j.oracle.embeddingStores.default.table = "test" langchain4j.oracle.embeddingStores.default.table.createOption = "create_if_not_exists" ``` ```HOCON (Object) { "datasources.default.dialect" = "oracle" "langchain4j.oracle.embedding-stores.default.table" = "test" "langchain4j.oracle.embedding-stores.default.table-create-option" = "create_if_not_exists" } ``` ```JSON { "datasources.default.dialect": "oracle", "langchain4j.oracle.embedding-stores.default.table": "test", "langchain4j.oracle.embedding-stores.default.table-create-option": "create_if_not_exists" } ``` -------------------------------- ### Configure Micronaut MongoDB Server Connection URI Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide Shows how to configure the default MongoDB server connection URI in Micronaut, including username, password, host, port, and database name. This is a general MongoDB client configuration. -------------------------------- ### Add Micronaut Langchain4j Anthropic Module Dependency Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide This snippet shows how to add the Micronaut Langchain4j Anthropic module dependency. This module provides integration with Anthropic's language models, allowing applications to leverage their capabilities. ```Gradle implementation("io.micronaut.langchain4j:micronaut-langchain4j-anthropic") ``` ```Maven io.micronaut.langchain4j micronaut-langchain4j-anthropic ``` -------------------------------- ### Configure Anthropic API Key in Micronaut Langchain4j Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide This snippet provides various ways to configure the Anthropic API key within a Micronaut Langchain4j application. It demonstrates configuration using properties, YAML, HOCON, and JSON formats. ```Properties langchain4j.anthropic.api-key=YOUR_KEY ``` ```YAML langchain4j.anthropic.api-key: YOUR_KEY ``` ```HOCON "langchain4j.anthropic.api-key"="YOUR_KEY" ``` ```Groovy langchain4j.anthropic.apiKey = "YOUR_KEY" ``` ```HOCON { "langchain4j.anthropic.api-key" = "YOUR_KEY" } ``` ```JSON { "langchain4j.anthropic.api-key": "YOUR_KEY" } ``` -------------------------------- ### Call Micronaut Langchain4j AI Service Definition in JUnit Test Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide This snippet illustrates how to inject and call an `@AiService` definition within a Micronaut JUnit test. It demonstrates how to test the interaction with the AI service and assert its behavior. ```Java package example; import static org.junit.jupiter.api.Assertions.assertNotNull; import dev.langchain4j.model.chat.ChatModel; import io.micronaut.test.extensions.junit5.annotation.MicronautTest; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @MicronautTest @Disabled("Ollama Testcontainers broken?") public class AiServiceTest { @Test void testAiService(Friend friend, ChatModel languageModel) { String result = friend.chat("Hello"); assertNotNull(result); assertNotNull(languageModel); } } ``` -------------------------------- ### Define Micronaut Langchain4j AI Service Interface with @AiService Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide This snippet demonstrates how to define an AI service interface using the `@AiService` annotation in Micronaut Langchain4j. It shows how to use Langchain4j annotations like `@SystemMessage` to define the behavior of the AI service. ```Java package example; import dev.langchain4j.service.SystemMessage; import io.micronaut.langchain4j.annotation.AiService; @AiService public interface Friend { @SystemMessage("You are a good friend of mine. Answer using slang.") String chat(String userMessage); } ``` -------------------------------- ### Configure Ollama Model Name in Micronaut Langchain4j Source: https://micronaut-projects.github.io/micronaut-langchain4j/latest/guide/latest/guide This snippet provides various ways to configure the Ollama model name within a Micronaut Langchain4j application. It demonstrates configuration using properties, YAML, HOCON, and JSON formats. ```Properties langchain4j.ollama.model-name=orca-mini ``` ```YAML langchain4j.ollama.model-name: orca-mini ``` ```HOCON "langchain4j.ollama.model-name"="orca-mini" ``` ```Groovy langchain4j.ollama.modelName = "orca-mini" ``` ```HOCON { "langchain4j.ollama.model-name" = "orca-mini" } ``` ```JSON { "langchain4j.ollama.model-name": "orca-mini" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.