Update Docs

- Update the docs to return describe changes 
- Add lines specific to how to toggle between output types .
pull/615/head
Sambhav Dixit 2 months ago committed by GitHub
parent a3ef4508a0
commit ad38711e23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -509,6 +509,13 @@ logging.basicConfig(level=logging.INFO)
monitored_agent = MonitoredAgent("MonitoredGriptapeAgent")
result = monitored_agent.run("Summarize the latest AI research papers")
```
Additionally the Agent class now includes built-in logging functionality and the ability to switch between JSON and string output.
To switch between JSON and string output:
- Use `output_type="str"` for string output (default)
- Use `output_type="json"` for JSON output
The `output_type` parameter determines the format of the final result returned by the `run` method. When set to "str", it returns a string representation of the agent's response. When set to "json", it returns a JSON object containing detailed information about the agent's run, including all steps and metadata.
## 6. Best Practices for Custom Agent Development
@ -614,4 +621,4 @@ The ability to seamlessly integrate agents from libraries like Griptape, Langcha
As you embark on your journey with the swarms framework, remember that the field of AI and agent-based systems is rapidly evolving. Stay curious, keep experimenting, and don't hesitate to push the boundaries of what's possible with custom agents and integrated libraries.
By embracing the power of the swarms framework and the ecosystem of agent libraries it supports, you're well-positioned to create the next generation of intelligent, adaptive, and collaborative AI systems. Happy agent building!
By embracing the power of the swarms framework and the ecosystem of agent libraries it supports, you're well-positioned to create the next generation of intelligent, adaptive, and collaborative AI systems. Happy agent building!

Loading…
Cancel
Save