Skip to content

Agents examples not working. #450

Open
@AndrewKeig

Description

@AndrewKeig

Im, trying to get this simple agent example working, but do not get the correct response, any help appreciated. If the agents api has been abandoned, please do let me know.

@huggingface/agents": "^0.0.5

Actual response

async function generate() {
  // your code here
  return output;
  };

Expected response

async function generate() {
  const output = await textToImage("Draw a picture of a cat");
  message("We generate the cat picture", output);
  return output;
}

example code

import { HfAgent } from '@huggingface/agents';

const HF_TOKEN = '';
const agent = new HfAgent(HF_TOKEN);
const code = await agent.generateCode("Draw a picture of a cat");
console.log(code);

Metadata

Metadata

Assignees

Labels

agents@huggingface/agents related

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions