Skip to content

Commit

Permalink
feat: vercel-ai-sdk (#67)
Browse files Browse the repository at this point in the history
# Pull Request Description

## Related Issue
Fixes #54 

## Changes Made
This PR adds the following changes:
<!-- List the key changes made in this PR -->
- Adds support for the Vercel AI SDK.
- Adds tests showcasing that the feature addition works.
  
## Implementation Details
<!-- Provide technical details about the implementation -->
- In order to add support for the SDK I installed all required
dependencies such as `ai, @ai-sdk/openai, and zod`
- The overall integration was simple, however, quite tedious as it
required a lot of conversions from the existing langchain integration

## Transaction executed by agent 
<!-- If applicable, provide example usage, transactions, or screenshots
-->
Example transaction: 
- TX link:
[4W5LFS9GnxeSffD1S2teUhg5e6VgL6P2DAQ4LQYqygk2nQJJLTtyi38zj5FaM2RiZe53ZmhRjuVqp47fXgnQwtva](https://solscan.io/tx/4W5LFS9GnxeSffD1S2teUhg5e6VgL6P2DAQ4LQYqygk2nQJJLTtyi38zj5FaM2RiZe53ZmhRjuVqp47fXgnQwtva)
- TX link:
[3oqHWwxUV6iz1ASxSyUikTPwA5MNySiUeBxzb5r2craoxEQXWdtXwtRkLnuDmYECvZZHZe6KvP7kTrydDrckGNXf](https://solscan.io/tx/3oqHWwxUV6iz1ASxSyUikTPwA5MNySiUeBxzb5r2craoxEQXWdtXwtRkLnuDmYECvZZHZe6KvP7kTrydDrckGNXf)
- TX link:
[51Wb8aQz1HE6X9pXmR9QJDoeEbV8chv8uEjzKdyTJfskngNiJj32VeEvRRHD8JKEXR6ydqqbCvfyDygWmdqQHtDx](https://solscan.io/tx/51Wb8aQz1HE6X9pXmR9QJDoeEbV8chv8uEjzKdyTJfskngNiJj32VeEvRRHD8JKEXR6ydqqbCvfyDygWmdqQHtDx)
- TX link:
[5yu133Sj2vztDHa43f7VASkibziDwSrYiZUuv1S9E6ov3S6N1bXyUa7MXDtV2E4XJLK4SfAepRC3fZqMEa4SnNyj](https://solscan.io/tx/5yu133Sj2vztDHa43f7VASkibziDwSrYiZUuv1S9E6ov3S6N1bXyUa7MXDtV2E4XJLK4SfAepRC3fZqMEa4SnNyj)
- Screenshot:
![Screenshot 2024-12-26 at 16 14
54](https://github.com/user-attachments/assets/69bbcdba-0c82-4af2-874d-c07493677124)


## Prompt Used
<!-- If relevant, include the prompt or configuration used -->
- No particular prompt was used. I ran `pnpm run test:vercel-ai`, chose
the autonomous option and let it do it's thing.

## Additional Notes
<!-- Any additional information that reviewers should know -->
The code `_call`/`execute` can be made reusable in case of any future
agent/platform integrations. This could be made into another bounty as
it will be quite tedious as well and type standards would need to be set
for maximum compatibility and least overhead down the line.

## Checklist
- [x] I have tested these changes locally
- [x] I have updated the documentation
- [x] I have added a transaction link
- [x] I have added the prompt used to test it
  • Loading branch information
thearyanag authored Jan 3, 2025
2 parents cb0e3a6 + 9b96db0 commit da09193
Show file tree
Hide file tree
Showing 42 changed files with 670 additions and 211 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ Anyone - whether an SF-based AI researcher or a crypto-native builder - can brin
- Memory management for persistent interactions
- Streaming responses for real-time feedback

- **Vercel AI SDK Integration**
- Vercel AI SDK for AI agent integration
- Framework agnostic support
- Quick and easy toolkit setup

- **Autonomous Modes**
- Interactive chat mode for guided operations
- Autonomous mode for independent agent actions
Expand Down Expand Up @@ -258,4 +263,3 @@ Apache-2 License
## Security

This toolkit handles private keys and transactions. Always ensure you're using it in a secure environment and never share your private keys.

2 changes: 1 addition & 1 deletion docs/assets/hierarchy.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
window.hierarchyData = "eJyrVirKzy8pVrKKjtVRKkpNy0lNLsnMzytWsqqurQUAmx4Kpg=="
window.hierarchyData = "eJyrVirKzy8pVrKKjtVRKkpNy0lNLsnMzwMKVNfWAgCbHgqm"
2 changes: 1 addition & 1 deletion docs/assets/navigation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/assets/search.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit da09193

Please sign in to comment.