-
-
Notifications
You must be signed in to change notification settings - Fork 347
feat(zhipu-ai): Implement ZhipuProvider for LLM integration #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The changes in this commit introduce the `ZhipuProvider` class, which implements the `LLMProvider` interface from the `@voltagent/core` package. This provider allows integration with the Zhipu AI API, enabling the use of Zhipu's language models within the Voltagent framework. The key changes include: - Defining the `ZhipuProviderOptions` interface to handle the configuration options for the Zhipu AI provider. - Implementing the `ZhipuProvider` class, which includes methods for generating text, streaming text, generating objects, and streaming objects using the Zhipu AI API. - Providing utility functions like `toMessage` and `createStepFromChunk` to handle the conversion between Voltagent's message format and the Zhipu AI response format. - Implementing the `getModelIdentifier` method to return the model identifier for the Zhipu AI language model. These changes allow the Voltagent framework to leverage the capabilities of the Zhipu AI language models, expanding the available options for developers using the Voltagent platform.
feat(zhipu-ai): Implement ZhipuProvider for LLM integration
|
Hey @nasawz , |
|
Hey! If you’d like to add a changeset, that would be awesome but no pressure at all. Here’s a quick guide on how to create one: Thanks again for the contribution ⚡ |
|
Hey! No problem at all! Please go ahead and add the changeset this time. I’ll make sure to include one with my next submission. Thanks again for the guidance and for your help! ⚡ |
|
Hey @nasawz , Would be awesome if you could also: |
This commit adds a new example for integrating the Zhipu AI language model into a VoltAgent application. The key changes include: 1. Adding a new example directory `examples/with-zhipu-ai` with a detailed README file explaining the setup and usage. 2. Updating the `pnpm-lock.yaml` file to remove unnecessary `dev` flags and ensure consistent dependency versions. 3. Improving the error handling in the `ZhipuProvider` class to call the provided `onError` callback when an error occurs during the API response parsing. These changes aim to provide a comprehensive example for developers to quickly get started with using the Zhipu AI language model within their VoltAgent-powered AI applications.
feat(voltagent): add example for Zhipu AI integration
|
Hey @nasawz , If you’re short on time, I can also handle it after merging. Totally up to you! |
🦋 Changeset detectedLatest commit: 40e6b8d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Bump @voltagent/cli from 0.1.2 to 0.1.5, core from 0.1.5 to 0.1.15, and vercel-ai from 0.1.2 to 0.1.7 in with-zhipu-ai example to ensure compatibility with recent fixes and improvements.
chore(deps): update @VoltAgent packages to latest versions
Bump @voltagent/core dependency from v0.1.3 to v0.1.14 to include latest fixes and improvements. This ensures better compatibility and stability for the zhipu-ai package.
chore(deps): update @voltagent/core to v0.1.14
|
Hey @omeraplak , I tried pulling from main and updating the changes, but I’m hitting issues with the auto-build. Could you take a look and help troubleshoot? I’d really appreciate your expertise here! Thanks |
Hey, |
- Upgrade @types/node from 18.x to 20.x across multiple packages to support newer Node.js versions and improve type definitions. - Update minimatch to 3.1.2 for better pattern matching and security fixes. - Add new zhipu-ai package with dependencies on AI SDKs, type definitions, and tooling to support AI-related features. - Introduce create-jest and jest-cli entries with updated peer dependencies and transitive peer dependencies for improved Jest integration. - Ensure consistency in devDependencies and lockfile integrity for better package management and reproducibility.
chore: update dependencies and add zhipu-ai package
|
Hey @omeraplak Thanks |
The changes in this commit introduce the
ZhipuProviderclass, which implements theLLMProviderinterface from the@voltagent/corepackage. This provider allows integration with the Zhipu AI API, enabling the use of Zhipu's language models within the Voltagent framework.The key changes include:
ZhipuProviderclass, implementing theLLMProviderinterface with the following core functionalities:generateText: Synchronous text generation.streamText: Streaming text generation.generateObject: Synchronous structured data generation.streamObject: Streaming structured data generation (stub implementation).ZHIPU_API_KEYenvironment variable.glm-4-air, with tool integration support.These changes allow the Voltagent framework to leverage the capabilities of the Zhipu AI language models, expanding the available options for developers using the Voltagent platform.