UNPKG

@juspay/neurolink

Version:

Universal AI Development Platform with working MCP integration, multi-provider support, and professional CLI. Built-in tools operational, 58+ external MCP servers discoverable. Connect to filesystem, GitHub, database operations, and more. Build, test, and

40 lines (39 loc) 1.8 kB
import type { ZodType, ZodTypeDef } from "zod"; import { type Schema, type LanguageModelV1 } from "ai"; import type { AIProviderName } from "../core/types.js"; import type { StreamOptions, StreamResult } from "../types/streamTypes.js"; import { BaseProvider } from "../core/baseProvider.js"; /** * HuggingFace Provider - BaseProvider Implementation * Using AI SDK with HuggingFace's OpenAI-compatible endpoint */ export declare class HuggingFaceProvider extends BaseProvider { private model; constructor(modelName?: string); /** * HuggingFace models currently don't properly support tool/function calling * * **Tested Models & Issues:** * - microsoft/DialoGPT-medium: Describes tools instead of executing them * - Most HF models via router endpoint: Function schema passed but not executed * - Issue: Models treat tool definitions as conversation context rather than executable functions * * **Known Limitations:** * - Tools are visible to model but treated as descriptive text * - No proper function call response format handling * - HuggingFace router endpoint doesn't enforce OpenAI-compatible tool execution * * @returns false to disable tools by default until proper implementation */ supportsTools(): boolean; protected executeStream(options: StreamOptions, analysisSchema?: ZodType<unknown, ZodTypeDef, unknown> | Schema<unknown>): Promise<StreamResult>; protected getProviderName(): AIProviderName; protected getDefaultModel(): string; /** * Returns the Vercel AI SDK model instance for HuggingFace */ protected getAISDKModel(): LanguageModelV1; protected handleProviderError(error: unknown): Error; private validateStreamOptions; } export default HuggingFaceProvider;