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

Configuration property

Type

Default

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

required

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

Maximum number of retries for Cohere API invocations.

Environment variable: QUARKUS_LANGCHAIN4J_COHERE_SCORING_MODEL_MAX_RETRIES

int

3

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.