Commit Graph

4 Commits

Author SHA1 Message Date
suyao
7c1b7ee40f Merge branch 'feat/ai-sdk-package' of https://github.com/CherryHQ/cherry-studio into feat/ai-sdk-package 2025-06-17 19:53:58 +08:00
suyao
b771873f6c feat: define types for AI core requests and provider options
feat: define types for AI core requests and provider options

- Introduced `ProviderOptions` type to standardize provider configuration.
- Added `AiCoreRequest` interface to encapsulate request parameters for AI operations.
- Updated `UniversalAiSdkClient` to utilize the new types, enhancing type safety and clarity in API interactions.

feat: update AI provider registry and dependencies

- Added new AI providers: OpenAI Compatible, Qwen, Ollama, and Anthropic Vertex to the provider registry.
- Updated package.json to include new dependencies for the added providers.
- Enhanced pnpm-lock.yaml with corresponding versions and peer dependencies for the new packages.
2025-06-17 19:49:22 +08:00
MyPrototypeWhat
453a2bcb68 feat: enhance AI Core with plugin system and middleware support
- Introduced a plugin system in the AI Core package, allowing for flexible request handling and middleware integration.
- Added support for various hook types: First, Sequential, Parallel, and Stream, enabling developers to customize request processing.
- Implemented a PluginManager for managing and executing plugins, enhancing extensibility and modularity.
- Updated architecture documentation to reflect new plugin capabilities and usage examples.
- Included new middleware types and examples to demonstrate the plugin system's functionality.

This update aims to improve the developer experience by providing a robust framework for extending AI Core's capabilities.
2025-06-17 19:48:14 +08:00
lizhixuan
7187e63ce2 feat: introduce Cherry Studio AI Core package with unified AI provider interface
- Added a new package `@cherry-studio/ai-core` that provides a unified interface for various AI providers based on the Vercel AI SDK.
- Implemented core components including `ApiClientFactory`, `UniversalAiSdkClient`, and a provider registry for dynamic imports.
- Included TypeScript support and a lightweight design for improved developer experience.
- Documented architecture and usage examples in `AI_SDK_ARCHITECTURE.md` and `README.md`.
- Updated `package.json` to include dependencies for supported AI providers.

This package aims to streamline the integration of multiple AI providers while ensuring type safety and modularity.
2025-06-16 22:35:09 +08:00