ChatCompletion ​Chat​Completion

yaml
type: "io.kestra.plugin.langchain4j.rag.chatcompletion"
yaml
id: rag
namespace: company.team

tasks:
  - id: ingest
    type: io.kestra.plugin.langchain4j.rag.IngestDocument
    provider:
      type: io.kestra.plugin.langchain4j.provider.GoogleGemini
      modelName: gemini-embedding-exp-03-07
      apiKey: "{{ secret('GEMINI_API_KEY') }}"
    embeddings:
      type: io.kestra.plugin.langchain4j.embeddings.KestraKVStore
    drop: true
    fromExternalURLs:
      - https://raw.githubusercontent.com/kestra-io/docs/refs/heads/main/content/blogs/release-0-22.md

  - id: chat_without_rag
    type: io.kestra.plugin.langchain4j.ChatCompletion
    provider:
      type: io.kestra.plugin.langchain4j.provider.GoogleGemini
      modelName: gemini-2.0-flash
      apiKey: "{{ secret('GEMINI_API_KEY') }}"
    messages:
    - type: user
      content: Which features were released in Kestra 0.22?

  - id: chat_with_rag
    type: io.kestra.plugin.langchain4j.rag.ChatCompletion
    chatProvider:
      type: io.kestra.plugin.langchain4j.provider.GoogleGemini
      modelName: gemini-2.0-flash
      apiKey: "{{ secret('GEMINI_API_KEY') }}"
    embeddingProvider:
      type: io.kestra.plugin.langchain4j.provider.GoogleGemini
      modelName: gemini-embedding-exp-03-07
      apiKey: "{{ secret('GEMINI_API_KEY') }}"
    embeddings:
      type: io.kestra.plugin.langchain4j.embeddings.KestraKVStore
    prompt: Which features were released in Kestra 0.22?

yaml
id: rag
namespace: company.team

tasks:
  - id: chat_with_rag_and_websearch_content_retriever
    type: io.kestra.plugin.langchain4j.rag.ChatCompletion
    chatProvider:
      type: io.kestra.plugin.langchain4j.provider.GoogleGemini
      modelName: gemini-2.0-flash
      apiKey: "{{ secret('GEMINI_API_KEY') }}"
    contentRetrievers:
    - type: io.kestra.plugin.langchain4j.retriever.GoogleCustomWebSearch
      apiKey: "{{ secret('GOOGLE_SEARCH_API_KEY') }}"
      csi: "{{ secret('GOOGLE_SEARCH_CSI') }}"
    prompt: What is the latest release of Kestra?

yaml
id: rag
namespace: company.team

tasks:
  - id: ingest
    type: io.kestra.plugin.langchain4j.rag.IngestDocument
    provider:
      type: io.kestra.plugin.langchain4j.provider.GoogleGemini
      modelName: gemini-embedding-exp-03-07
      apiKey: "{{ secret('GEMINI_API_KEY') }}"
    embeddings:
      type: io.kestra.plugin.langchain4j.embeddings.KestraKVStore
    drop: true
    fromExternalURLs:
      - https://raw.githubusercontent.com/kestra-io/docs/refs/heads/main/content/blogs/release-0-22.md

  - id: chat_with_rag_and_tool
    type: io.kestra.plugin.langchain4j.rag.ChatCompletion
    chatProvider:
      type: io.kestra.plugin.langchain4j.provider.GoogleGemini
      modelName: gemini-2.0-flash
      apiKey: "{{ secret('GEMINI_API_KEY') }}"
    embeddingProvider:
      type: io.kestra.plugin.langchain4j.provider.GoogleGemini
      modelName: gemini-embedding-exp-03-07
      apiKey: "{{ secret('GEMINI_API_KEY') }}"
    embeddings:
      type: io.kestra.plugin.langchain4j.embeddings.KestraKVStore
    tools:
    - type: io.kestra.plugin.langchain4j.tool.GoogleCustomWebSearch
      apiKey: "{{ secret('GOOGLE_SEARCH_API_KEY') }}"
      csi: "{{ secret('GOOGLE_SEARCH_CSI') }}"
    prompt: What is the latest release of Kestra?
Properties
Default {}
Default { "maxResults": 3, "minScore": 0 }
Possible Values
STOPLENGTHTOOL_EXECUTIONCONTENT_FILTEROTHER
Default 3
Default 0
Default https://api.deepseek.com/v1
Default 3
SubType string
Min items 1
SubType string
Default {{flow.id}}-embedding-store
Default COHERE
Possible Values
COHERETITAN
Default false
Default 3
SubType string
SubType string
Format duration