-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Description
Create convenient function wrappers to simplify common use cases and improve developer experience when using the MiniAgent framework.
Tasks
StreamText Function
- Create
streamText()convenience function - Support simple text generation
- Automatically select best Chat implementation
- Provide configuration options
Target API Design
// Simple streaming text generation
const stream = streamText({
prompt: "Hello, how are you?",
model: "gpt-4",
apiKey: "...",
});
for await (const chunk of stream) {
console.log(chunk.text);
}Other Convenience Functions
-
generateText()- Non-streaming text generation -
chatWithTools()- Simplified tool calling -
createAgent()- Quick agent creation
Benefits
- Lower barrier to entry for new users
- Reduced boilerplate code
- Intuitive API design
- Better developer experience
Implementation Notes
- Functions should auto-detect and use appropriate Chat implementation (OpenAI, Gemini, etc.)
- Provide sensible defaults while allowing customization
- Maintain compatibility with existing framework
Priority
Medium 🔧
Labels
- enhancement
- developer-experience
- api
- documentation
Metadata
Metadata
Assignees
Labels
No labels