Gateway Class
The main class for interacting with LLMs through the Adaline Gateway.Constructor
Parameters
Methods
completeChat
Non-streaming chat completion. Sends messages to an LLM and returns the full response.CompleteChatHandlerResponseType
streamChat
Streaming chat completion. Returns an async generator that yields response chunks.AsyncGenerator<StreamChatHandlerResponseType>
getEmbeddings
Generate embeddings for text or other modalities.GetEmbeddingsHandlerResponseType
getToolResponses
Execute tool calls returned by an LLM.GetToolResponsesHandlerResponseType
getChatUsageCost (static)
Calculate the cost of a chat completion based on token usage.GetChatUsageCostHandlerResponseType