UNPKG

@coze/uniapp-api

Version:

Official Coze UniApp SDK for seamless AI integration into your applications | 扣子官方 UniApp SDK,助您轻松集成 AI 能力到应用中

27 lines (26 loc) 758 B
import { CozeAPI as InnerCozeAPI, type ClientOptions as InnerClientOptions } from '@coze/api'; export interface ClientOptions extends InnerClientOptions { onBeforeAPICall?: (options: unknown) => ({ token?: string; } | void) | Promise<{ token?: string; } | void>; } /** * Coze API for UniApp * 针对UniApp环境的Coze API实现 */ export declare class CozeAPI extends InnerCozeAPI { options: ClientOptions; constructor(options: ClientOptions); /** * 获取适配器 * 根据环境返回对应的适配器,web环境使用默认适配器,非web环境使用UniApp适配器 */ private getAdapter; /** * 应用混入 * 非web环境下应用混入 */ private applyMixins; }