UNPKG

@copilotkit/runtime-client-gql

Version:

<img src="https://github.com/user-attachments/assets/0a6b64d9-e193-4940-a3f6-60334ac34084" alt="banner" style="border-radius: 12px; border: 2px solid #d6d4fa;" />

44 lines (43 loc) 1.82 kB
import { AvailableAgentsQuery, Exact, GenerateCopilotResponseInput, GenerateCopilotResponseMutation, GenerateCopilotResponseMutationVariables, InputMaybe, LoadAgentStateQuery, Scalars } from "../graphql/@generated/graphql.mjs"; import { Client } from "@urql/core"; import * as urql from "urql"; import { OperationResult, OperationResultSource } from "urql"; //#region src/client/CopilotRuntimeClient.d.ts interface CopilotRuntimeClientOptions { url: string; publicApiKey?: string; headers?: Record<string, string>; credentials?: RequestCredentials; handleGQLErrors?: (error: Error) => void; handleGQLWarning?: (warning: string) => void; } declare class CopilotRuntimeClient { client: Client; handleGQLErrors?: (error: Error) => void; handleGQLWarning?: (warning: string) => void; constructor(options: CopilotRuntimeClientOptions); generateCopilotResponse({ data, properties, signal }: { data: GenerateCopilotResponseMutationVariables["data"]; properties?: GenerateCopilotResponseMutationVariables["properties"]; signal?: AbortSignal; }): OperationResultSource<OperationResult<GenerateCopilotResponseMutation, Exact<{ data: GenerateCopilotResponseInput; properties?: InputMaybe<Scalars["JSONObject"]["input"]>; }>>>; asStream<S, T>(source: OperationResultSource<OperationResult<S, { data: T; }>>): ReadableStream<S>; availableAgents(): OperationResultSource<OperationResult<AvailableAgentsQuery, urql.AnyVariables>>; loadAgentState(data: { threadId: string; agentName: string; }): OperationResultSource<OperationResult<LoadAgentStateQuery, urql.AnyVariables>>; static removeGraphQLTypename(data: any): any; } //#endregion export { CopilotRuntimeClient, CopilotRuntimeClientOptions }; //# sourceMappingURL=CopilotRuntimeClient.d.mts.map