Open
Description
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);