class

ActiveAgent::Providers::OpenAICompatible

Inherits ActiveAgent::StreamingProvider < ActiveAgent::Provider < ActiveAgent::Provider < Reference < Object

Constructors

new(api_key : String = "", base_url : String = "", default_model : String | Nil = nil, stream_options : Bool = true)
Source

Instance methods

build_payload(request : ProviderRequest) : String
Source
build_stream_payload(request : ProviderRequest) : String
Source
chat(request : ProviderRequest) : ProviderResponse
Source
ensure_ok(response : HTTP::Client::Response) : Nil
Source
parse_message(payload : JSON::Any) : ProviderResponse
Source
parse_response(body : String) : ProviderResponse
Source
parse_usage(u : JSON::Any | Nil) : Usage
Source
stream_chat(request : ProviderRequest, & : String -> Nil) : ProviderResponse
Source