UNPKG

@hashbrownai/core

Version:

Runtime helpers for Hashbrown AI

31 lines 925 B
import { Chat } from '../models'; import { Transport, TransportRequest, TransportResponse } from './transport'; /** * Options for the default HTTP transport. * @public */ export interface HttpTransportOptions { baseUrl: string; middleware?: Chat.Middleware[]; fetchImpl?: typeof fetch; } /** * Default HTTP-based transport that mirrors Hashbrown's legacy behavior. * * @public */ export declare class HttpTransport implements Transport { readonly name = "HttpTransport"; private readonly baseUrl; private readonly middleware?; private readonly fetchImpl; constructor(options: HttpTransportOptions); send(request: TransportRequest): Promise<TransportResponse>; } /** * Helper for creating HTTP transports while preserving inference. * * @public */ export declare function createHttpTransport(options: HttpTransportOptions): Transport; //# sourceMappingURL=http-transport.d.ts.map