Create an OpenAI-compatible Config Object
config_OpenAI.RdCreates an OpenAIConfig object which can be passed to create_agent()
Usage
config_OpenAI(
model_name,
temperature = TEMPERATURE_DEFAULT,
base_url = OPENAI_URL_DEFAULT,
api_key = NULL,
api_key_env = OPENAI_API_KEY_ENV_DEFAULT,
keychain_service = NULL,
organization = NULL,
project = NULL,
timeout = OPENAI_TIMEOUT_DEFAULT,
extra_headers = NULL,
extra_body = NULL,
enable_thinking = NULL,
validate_model = FALSE
)Arguments
- model_name
Character: The name of the LLM model to use.
- temperature
Numeric [0, 2]: The temperature for the model.
- base_url
Character: Base URL of the OpenAI-compatible server.
- api_key
Optional character: API key.
- api_key_env
Character: Environment variable containing the API key.
- keychain_service
Optional character: macOS Keychain service containing the API key.
- organization
Optional character: OpenAI organization id.
- project
Optional character: OpenAI project id.
- timeout
Numeric (0, Inf): Request timeout in seconds.
- extra_headers
Optional list: Additional HTTP headers.
- extra_body
Optional list: Additional request body fields.
- enable_thinking
Optional logical: Whether to enable model thinking for compatible local servers.
- validate_model
Logical: Whether to validate model availability using the models endpoint.