eliza icon indicating copy to clipboard operation
eliza copied to clipboard

feat: Add 0G plugin for file storage

Open Wilbert957 opened this issue 1 year ago • 9 comments

This PR adds a new plugin for 0G.

Risks

Low. This change involves adding a new plugin, which is isolated and should not affect existing functionality.

Background

What does this PR do?

This PR adds a new plugin for 0G, which includes an action that allows users to upload local files to 0G Storage. Future work will include extending 0G support for model serving, state persistence via KV store, and enhanced file management capabilities.

What kind of change is this?

Features (non-breaking change which adds functionality).

Why are we doing this? Any context or related work?

To extend the functionality of Eliza.

Documentation changes needed?

Require a change to the project documentation.

Testing

Where should a reviewer start?

The review can start with the new 0G plugin code, focusing on the action that uploads files to ensure it handles files correctly and integrates well with 0G Storage.

Detailed testing steps

  1. Set Environment Variables
    Screenshot 2024-11-20 at 09 34 49 Configure the following variables:

    • ZEROG_INDEXER_RPC
    • ZEROG_EVM_RPC
    • ZEROG_PRIVATE_KEY
    • ZEROG_FLOW_ADDRESS More details
  2. Add 0g-plugin into character file Ensure the @ai16z/plugin-0g is properly added and configured in the character file.

Screenshot 2024-11-20 at 09 34 10
  1. Interact with the Agent Send a message to the agent: Upload the file at /path/to/your/file.txt to zg storage. Screenshot 2024-11-20 at 08 47 05 Screenshot 2024-11-20 at 08 47 58

Screenshots

Before

After

Database changes

Deployment instructions

Wilbert957 avatar Nov 19 '24 09:11 Wilbert957

Hey @Wilbert957 Great work!

There are conflicts that needs to be resolved before a merge could happen, could you fix that?

In the package.json for 0g-plugin, kind add dev command ("dev": "tsup --watch").

shakkernerd avatar Nov 19 '24 15:11 shakkernerd

Thanks for your notification. Sure, I'll fix it ASAP.

Shakker Nerd @.***> 于2024年11月19日周二 23:09写道:

Hey @Wilbert957 https://github.com/Wilbert957 Great work!

There are conflicts that needs fixing, could you fix that?

In the package.json for 0g-plugin, kind add dev command ("dev": "tsup --watch").

— Reply to this email directly, view it on GitHub https://github.com/ai16z/eliza/pull/416#issuecomment-2485981520, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGT4B6HYQLKT3KSBOW3CFJT2BNICXAVCNFSM6AAAAABSBTEVX6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOBVHE4DCNJSGA . You are receiving this because you were mentioned.Message ID: @.***>

Wilbert957 avatar Nov 19 '24 15:11 Wilbert957

Hey @Wilbert957 Great work!

There are conflicts that needs to be resolved before a merge could happen, could you fix that?

In the package.json for 0g-plugin, kind add dev command ("dev": "tsup --watch").

I've fixed it. Could you please check?

Wilbert957 avatar Nov 19 '24 15:11 Wilbert957

Kindly attach a screengrab of the upload/file storage interaction.

@Wilbert957 This has been updated.

shakkernerd avatar Nov 19 '24 15:11 shakkernerd

Please resolve conflicts and add a test and / or screen grab of working plugin functionality thanks so much! Amazing work with this plugin you are the GOAT!

monilpat avatar Nov 19 '24 19:11 monilpat

Kindly attach a screengrab of the upload/file storage interaction.

@Wilbert957 This has been updated.

Sure, thanks. I've attached a screengrab.

Wilbert957 avatar Nov 20 '24 02:11 Wilbert957

Please resolve conflicts and add a test and / or screen grab of working plugin functionality thanks so much! Amazing work with this plugin you are the GOAT!

Sure, thanks. I've attached a screengrab.

Wilbert957 avatar Nov 20 '24 02:11 Wilbert957

Please resolve conflicts and add a test and / or screen grab of working plugin functionality thanks so much! Amazing work with this plugin you are the GOAT!

I've resolved conflicts~

Wilbert957 avatar Nov 20 '24 14:11 Wilbert957

Hey @Wilbert957 Great work!

There are conflicts that needs to be resolved before a merge could happen, could you fix that?

In the package.json for 0g-plugin, kind add dev command ("dev": "tsup --watch").

I've resolved conflicts~

Wilbert957 avatar Nov 20 '24 14:11 Wilbert957

Hey @Wilbert957 Great work!

There are conflicts that needs to be resolved before a merge could happen, could you fix that?

In the package.json for 0g-plugin, kind add dev command ("dev": "tsup --watch").

Hi @shakkernerd

I hope you're doing well! I wanted to kindly remind you that my pull request (#PR-416) is awaiting your review and approval. Your feedback would be greatly appreciated.

Wilbert957 avatar Nov 25 '24 03:11 Wilbert957

Hi, @monilpat. Conflicts resolved. Would know if can merge? Your feedback would be greatly appreciated.

Wilbert957 avatar Nov 25 '24 06:11 Wilbert957