context
Sets additional context for the completion request using a Map.
This method allows providing additional key-value pairs that may be relevant for generating completions. This is an optional field.
Example:
completeRequest {
context(mapOf("userId" to "123", "role" to "admin"))
// ... other configuration
}Content copied to clipboard
Parameters
arguments
A map of context key-value pairs
Sets additional context for the completion request using a DSL builder.
This method allows providing additional key-value pairs that may be relevant for generating completions using a type-safe builder syntax. This is an optional field.
Example:
completeRequest {
context {
put("userId", "123")
put("role", "admin")
put("environment", "production")
}
// ... other configuration
}Content copied to clipboard
Parameters
block
Lambda with receiver for building the context map