Commit Graph

7 Commits

Author SHA1 Message Date
suyao
3a2a3c04a9 feat: 完成api层,业务逻辑层,编排层的分离
feat: 为插件系统实现中间件
feat: 实现自定义的思考中间件

- Updated package.json and related files to reflect the correct naming convention for the @cherrystudio/ai-core package.
- Adjusted import paths in various files to ensure consistency with the new package name.
- Enhanced type resolution in tsconfig.web.json to align with the updated package structure.
2025-06-20 05:44:44 +08:00
MyPrototypeWhat
f9c7ae5169 feat: integrate @cherry-studio/ai-core and enhance AI SDK support
- Added @cherry-studio/ai-core as a workspace dependency in package.json for improved modularity.
- Updated tsconfig to include paths for the new AI core package, enhancing type resolution.
- Refactored aiCore package to use source files directly, improving build efficiency.
- Introduced a new AiSdkToChunkAdapter for converting AI SDK streams to Cherry Studio chunk format.
- Implemented a modernized AI provider interface in index_new.ts, allowing fallback to legacy implementations.
- Enhanced parameter transformation logic for better integration with AI SDK features.
- Updated ApiService to utilize the new AI provider, streamlining chat completion requests.
2025-06-19 18:55:59 +08:00
MyPrototypeWhat
c51bcdefc5 feat: enhance AI Core with new client and plugin system features
- Introduced `PluginEnabledAiClient` for a more flexible client interface with integrated plugin support.
- Updated `ApiClientFactory` and `UniversalAiSdkClient` to utilize new provider settings for improved type safety.
- Added a comprehensive plugin management system, allowing for dynamic plugin registration and execution.
- Enhanced the provider registry to include new AI providers and updated existing provider settings.
- Removed deprecated files and streamlined the codebase for better maintainability and clarity.
- Updated documentation to reflect new features and usage examples for the plugin system.
2025-06-18 19:23:14 +08:00
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