Skip to content
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

Activate Plugin to Generate an NFT #209

Open
IkigaiLabsETH opened this issue Dec 19, 2024 · 0 comments
Open

Activate Plugin to Generate an NFT #209

IkigaiLabsETH opened this issue Dec 19, 2024 · 0 comments
Assignees

Comments

@IkigaiLabsETH
Copy link
Owner

Image
Image

just need to activate the plugin in the the character file :
"plugins": ["@ai16z/plugin-solana", "@ai16z/plugin-nft-generation"],

but for it to work we need to get AWS keys and solana admin key

////

https://github.com/leonprou/eliza-starter/blob/fix/loading-plugins/src/index.ts![Image](https://github.com/user-attachments/assets/d4f326e2-46d5-437c-b590-8ccfba6898c9)

example: https://x.com/centienceio/status/1860171705207128183

Image

Image

goal: have eliza generate AI art on our Heurist key
in .env we have set

instructions below from docs unclear,
screenshot above is what coders on discord suggest

const result = await generateImage(
{
prompt: "A cute anime girl with big breasts and straight long black hair wearing orange T-shirt. The T-shirt has "ai16z" texts in the front. The girl is looking at the viewer",
width: 1024,
height: 1024,
numIterations: 20, // optional
guidanceScale: 3, // optional
seed: -1, // optional
modelId: "FLUX.1-dev", // optional
},
runtime,
);

//

const generateImageAction: Action = {
name: "GENERATE_IMAGE",
similes: ["CREATE_IMAGE", "MAKE_PICTURE"],
description: "Generate an AI image from text",

validate: async (runtime, message) => {
return (
!!runtime.getSetting("ANTHROPIC_API_KEY") &&
!!runtime.getSetting("TOGETHER_API_KEY")
);
},

handler: async (runtime, message, state, options, callback) => {
const images = await generateImage(
{ prompt: message.content.text },
runtime,
);

const captions = await Promise.all(
  images.data.map((image) => generateCaption({ imageUrl: image }, runtime)),
);

callback?.(
  {
    text: "Generated images",
    attachments: images.data.map((image, i) => ({
      id: crypto.randomUUID(),
      url: image,
      title: "Generated image",
      description: captions[i].title,
    })),
  },
  [],
);

},
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants