Skip to contents

Creates an ellmer chat client for the OpenAI-compatible Panama endpoint. All configuration comes from the environment; the API key is never stored in source. Temperature is fixed at 0 for scoring, because scores must be comparable across business cases.

Usage

liminal_chat(
  model = Sys.getenv("LIMINAL2_MODEL", "glm-5.3"),
  base_url = Sys.getenv("PANAMA_BASE_URL", "https://panama.ixpantia.ixops.ai/v1"),
  api_key = Sys.getenv("PANAMA_API_KEY")
)

Arguments

model

The model name. Defaults to the LIMINAL2_MODEL environment variable, falling back to "glm-5.3".

base_url

The endpoint URL. Defaults to the PANAMA_BASE_URL environment variable, falling back to the Panama endpoint.

api_key

The bearer key. Defaults to the PANAMA_API_KEY environment variable; an informative error is raised when unset.

Value

An ellmer Chat object.

Details

The chat object carries the configuration and the provenance of the client; the scoring calls themselves are issued by the package's httr2 transport (see assess_liminal_space()).

Examples

# \donttest{
if (nzchar(Sys.getenv("PANAMA_API_KEY"))) {
  chat <- liminal2::liminal_chat()
}
# }