Configuration property fixed at build time - All other configuration properties are overridable at runtime

Configuration property

Type

Default

Whether the scoring model should be enabled.

Environment variable: QUARKUS_LANGCHAIN4J_COHERE_SCORING_MODEL_ENABLED

boolean

true

Base URL of the Cohere API.

Environment variable: QUARKUS_LANGCHAIN4J_COHERE_BASE_URL

string

https://api.cohere.ai/

Cohere API key.

Environment variable: QUARKUS_LANGCHAIN4J_COHERE_API_KEY

string

dummy

Timeout for Cohere calls.

Environment variable: QUARKUS_LANGCHAIN4J_COHERE_TIMEOUT

Duration 

30s

Reranking model to use. The current list of supported models can be found in the Cohere docs

Environment variable: QUARKUS_LANGCHAIN4J_COHERE_SCORING_MODEL_MODEL_NAME

string

rerank-multilingual-v2.0

Timeout for Cohere calls

Environment variable: QUARKUS_LANGCHAIN4J_COHERE_SCORING_MODEL_TIMEOUT

Duration 

30S

Whether embedding model requests should be logged.

Environment variable: QUARKUS_LANGCHAIN4J_COHERE_SCORING_MODEL_LOG_REQUESTS

boolean

false

Whether embedding model responses should be logged.

Environment variable: QUARKUS_LANGCHAIN4J_COHERE_SCORING_MODEL_LOG_RESPONSES

boolean

false

The maximum number of times to retry. 1 means exactly one attempt, with retrying disabled.

Environment variable: QUARKUS_LANGCHAIN4J_COHERE_SCORING_MODEL_MAX_RETRIES

int

1

Named model config

Type

Default

Base URL of the Cohere API.

Environment variable: QUARKUS_LANGCHAIN4J_COHERE__MODEL_NAME__BASE_URL

string

https://api.cohere.ai/

Cohere API key.

Environment variable: QUARKUS_LANGCHAIN4J_COHERE__MODEL_NAME__API_KEY

string

dummy

Timeout for Cohere calls.

Environment variable: QUARKUS_LANGCHAIN4J_COHERE__MODEL_NAME__TIMEOUT

Duration 

30s

Reranking model to use. The current list of supported models can be found in the Cohere docs

Environment variable: QUARKUS_LANGCHAIN4J_COHERE__MODEL_NAME__SCORING_MODEL_MODEL_NAME

string

rerank-multilingual-v2.0

Timeout for Cohere calls

Environment variable: QUARKUS_LANGCHAIN4J_COHERE__MODEL_NAME__SCORING_MODEL_TIMEOUT

Duration 

30S

Whether embedding model requests should be logged.

Environment variable: QUARKUS_LANGCHAIN4J_COHERE__MODEL_NAME__SCORING_MODEL_LOG_REQUESTS

boolean

false

Whether embedding model responses should be logged.

Environment variable: QUARKUS_LANGCHAIN4J_COHERE__MODEL_NAME__SCORING_MODEL_LOG_RESPONSES

boolean

false

The maximum number of times to retry. 1 means exactly one attempt, with retrying disabled.

Environment variable: QUARKUS_LANGCHAIN4J_COHERE__MODEL_NAME__SCORING_MODEL_MAX_RETRIES

int

1

About the Duration format

To write duration values, use the standard java.time.Duration format. See the Duration#parse() Java API documentation for more information.

You can also use a simplified format, starting with a number:

  • If the value is only a number, it represents time in seconds.

  • If the value is a number followed by ms, it represents time in milliseconds.

In other cases, the simplified format is translated to the java.time.Duration format for parsing:

  • If the value is a number followed by h, m, or s, it is prefixed with PT.

  • If the value is a number followed by d, it is prefixed with P.