AI SDK

This plugin provides a unified AI model configuration center, supporting all major mainstream AI models. Configure once, use everywhere, without the need to repeatedly set API Keys.


Introduction to AI SDK Dependency Plugin

The "AI SDK Dependency Plugin" is a development toolkit for browser plugin developers, providing a unified AI model configuration center that supports all major mainstream AI models. Configure once, use everywhere. This toolkit allows developers to easily implement AI functions such as text generation, structured object generation, and streaming processing in their own plugins. By integrating the "AI SDK Dependency Plugin", developers can seamlessly expand their plugin's AI processing capabilities, bringing more intelligent and practical features to users.

Unified Configuration Center: Configure Once, Use Everywhere

The AI SDK plugin provides a unified AI model configuration center, supporting:

Commercial Models:

  • OpenAI (GPT-4, GPT-4 Vision)

  • Anthropic Claude (Claude 3 Opus, Claude 3.5 Sonnet)

  • Google Gemini (Gemini Pro, Gemini Ultra)

  • DeepSeek (DeepSeek Chat, DeepSeek Coder)

  • Alibaba Qwen (Tongyi Qianwen)

Local Models (completely offline operation):

  • Ollama (supporting Llama 3, Mistral, Phi-3, etc.)

  • LM Studio (graphical interface, beginner-friendly)

After configuring once, all AI-related plugins can use it directly without repeated settings. For example: if you install "AI Translation" and "AI Rename" plugins today, they will automatically share the configuration you filled in the SDK, and can even choose different models individually, without requiring you to enter API Keys again.

Open Development Environment

Based on ai-sdk.dev standards (AI SDK v5), the AI SDK plugin provides developers with a set of clean and stable infrastructure. Developers no longer need to spend effort handling basic configurations such as API Key storage, model switching, and error retry, and can focus on plugin innovation. The only difference is in Provider acquisition - we use our own developed Providers to ensure better stability and user experience.


Installing the AI SDK Dependency Plugin

  1. Enter the plugin center

  2. Search and find the AI SDK plugin

  3. Click to install the AI SDK plugin

Please note that when users install plugins with AI SDK dependencies, Eagle will automatically prompt users to install the "AI SDK Dependency Plugin". Therefore, developers do not need to specifically write code for users to install, as the system will automatically ensure related dependencies are installed before allowing plugins to run.


How to Use the AI SDK Dependency Plugin

If you want to use AI SDK related functions in your plugin, you need to add a dependencies definition in the plugin's manifest.json file, so that the Eagle system knows this plugin needs additional extension functions, as shown below:

Window Plugin Example

You can use eagle.extraModule.ai to call the functions provided by the AI SDK dependency plugin. Here are examples of various usage methods:

generateText() - Basic Text Generation

generateObject() - Structured Object Generation

streamText() - Streaming Text Generation

streamObject() - Streaming Object Generation

Important Reminder: AI SDK is fully compatible with all APIs and usage methods of ai-sdk.dev v5. The above examples only show basic usage. The only difference is in Provider acquisition - please use eagle.extraModule.ai.getProviders() to get configured AI providers. The system will automatically handle API Keys and related configurations, so developers don't need to worry about these details.

For more detailed usage methods and advanced features, please refer to the AI SDK v5 Official Documentation. Note that newer versions of AI SDK may have different APIs or features.

Last updated