openrouter_client

Types

pub type Client {
  Client(
    api_key: String,
    model: String,
    system_prompt: option.Option(String),
  )
}

Constructors

  • Client(
      api_key: String,
      model: String,
      system_prompt: option.Option(String),
    )

Functions

pub fn new(
  api_key: String,
  model: String,
  system_prompt: Option(String),
) -> Client

Create a new Openrouter client Takes in the api key, a model name and a optional system prompt

pub fn send(
  client: Client,
  prompt: String,
) -> Result(OpenrouterResponse, OpenrouterError)
Search Document