LLM agents for GraphAI.
npm install @graphai/llm_agentsLLM agents for GraphAI.
``sh`
yarn add @graphai/llm_agents
| Agent | APIKEY | Stream | Tools | Web | History |
|----------------|----------------------|--------|-------|-------|---------|
| anthropicAgent | ANTHROPIC_API_KEY | Y | Y | Y(*1) | Y |
| geminiAgent | GOOGLE_GENAI_API_KEY | Y | Y | Y | Y |
| groqAgent | GROQ_API_KEY | Y | Y | Y(*1) | Y |
| openAIAgent | OPENAI_API_KEY | Y | Y | Y(*1) | Y |
| replicateAgent | REPLICATE_API_TOKEN | N | N | N | N |
(*1) dangerouslyAllowBrowser
`typescript
import { GraphAI } from "graphai";
import {
anthropicAgent,
geminiAgent,
groqAgent,
openAIAgent,
openAIFetchAgent,
openAIImageAgent,
replicateAgent
} from "@graphai/llm_agents";
const agents = {
anthropicAgent,
geminiAgent,
groqAgent,
openAIAgent,
openAIFetchAgent,
openAIImageAgent,
replicateAgent
};
const graph = new GraphAI(graph_data, agents);
const result = await graph.run();
`
`typescript`
{
"inputs": {
"prompt": "this is response result"
},
"params": {}
}
- openAIFetchAgent
- inputs
- prompt(string)
- query string
- messages(undefined)
- chat messages
- params
- prompt(string)
- query string
- messages(undefined)
- chat messages
`typescript``
{
"inputs": {
"prompt": "this is response result"
},
"params": {}
}