Learn R Programming

rtemis.llm (version 0.8.1)

openai_list_models: List OpenAI-compatible Models

Description

List OpenAI-compatible Models

Usage

openai_list_models(
  base_url = OPENAI_URL_DEFAULT,
  api_key = NULL,
  api_key_env = OPENAI_API_KEY_ENV_DEFAULT,
  keychain_service = NULL,
  organization = NULL,
  project = NULL
)

Value

Character vector: Model ids.

Arguments

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.

Author

EDG

Examples

Run this code
# Requires running OpenAI-compatible server with /models endpoint
if (FALSE) {
  openai_list_models(
    base_url = "http://localhost:1234/v1",
    api_key = "test-key"
  )
}

Run the code above in your browser using DataLab