import { Client } from "@AEYE/product";
const client = new AIClient({
apiKey: process.env.AEYE_API_KEY,
});
// Send input & context
const response = await client.generate({
task: "summarize",
input: "summarize the following document into key insights",
});
// Trigger next action
if (metadata.score > 0.8){
await notifyUser(output);
}
npm install -g @aeye/cli
# Authenticate
aeye login --api-key $AEYE_API_KEY
# Run task
aeye generate \
--task summarize \
--input "summarize the following document into key insights"
# Example with pipe
cat document.txt | aeye generate --task summarize
from aeye import Client
import os
client = Client(api_key=os.getenv("AEYE_API_KEY"))
# Send input & context
response = client.generate(
task="summarize",
input="summarize the following document into key insights"
)
output = response.get("output")
metadata = response.get("metadata", {})
# Trigger next action
if metadata.get("score", 0) > 0.8:
notify_user(output)