-
Notifications
You must be signed in to change notification settings - Fork 145
feat(examples): add rest examples from docs #2086
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @aleskalfas, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly expands the existing examples and end-to-end test coverage for agent integration features. It introduces new examples demonstrating how to configure agent details, manage settings, interact with a canvas, handle citations, utilize environment variables, implement various error reporting mechanisms, process files, create dynamic forms, access LLM services via a proxy, integrate with MCP (including OAuth), build RAG agents, manage secrets, and visualize agent trajectories. These additions are complemented by updated documentation to guide users through these new capabilities, enhancing the overall developer experience and ensuring the robustness of the agent framework. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request is a great addition, providing a comprehensive set of examples and end-to-end tests for various agent integrations. The documentation has also been updated to embed these examples, which will significantly improve the developer experience. The overall code quality is high. I've identified a few minor areas for improvement, mainly related to code duplication in tests and a small typo in a configuration file. Addressing these will enhance the maintainability and robustness of the new code.
| with subtests.test("agent detail extension is configured"): | ||
| agent_detail = get_extension(agent_card, AGENT_DETAIL_EXTENSION_URI) | ||
| assert agent_detail is not None | ||
|
|
||
| params = agent_detail.model_dump()["params"] | ||
| assert params["interaction_mode"] == "multi-turn" | ||
| assert ( | ||
| params["user_greeting"] == "Hi there! I can help you research topics or summarize uploaded documents." | ||
| ) | ||
| assert params["framework"] == "BeeAI Framework" | ||
| assert params["source_code_url"] == "https://github.com/example/example-research-assistant" | ||
|
|
||
| with subtests.test("agent detail has author info"): | ||
| agent_detail = get_extension(agent_card, AGENT_DETAIL_EXTENSION_URI) | ||
| params = agent_detail.model_dump()["params"] | ||
|
|
||
| assert params["author"]["name"] == "Agent Stack Team" | ||
| assert params["author"]["email"] == "[email protected]" | ||
|
|
||
| with subtests.test("agent detail has tools"): | ||
| agent_detail = get_extension(agent_card, AGENT_DETAIL_EXTENSION_URI) | ||
| params = agent_detail.model_dump()["params"] | ||
|
|
||
| tools = params["tools"] | ||
| assert len(tools) == 2 | ||
|
|
||
| tool_names = {tool["name"] for tool in tools} | ||
| assert tool_names == {"Web Search", "Document Reader"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve readability and reduce code repetition, the agent_detail and params variables can be fetched once before the subtests that use them. This makes the test cleaner and more maintainable.
agent_detail = get_extension(agent_card, AGENT_DETAIL_EXTENSION_URI)
assert agent_detail is not None
params = agent_detail.model_dump()["params"]
with subtests.test("agent detail extension is configured"):
assert params["interaction_mode"] == "multi-turn"
assert (
params["user_greeting"] == "Hi there! I can help you research topics or summarize uploaded documents."
)
assert params["framework"] == "BeeAI Framework"
assert params["source_code_url"] == "https://github.com/example/example-research-assistant"
with subtests.test("agent detail has author info"):
assert params["author"]["name"] == "Agent Stack Team"
assert params["author"]["email"] == "[email protected]"
with subtests.test("agent detail has tools"):
tools = params["tools"]
assert len(tools) == 2
tool_names = {tool["name"] for tool in tools}
assert tool_names == {"Web Search", "Document Reader"}
...agentstack-server/tests/e2e/examples/agent-integration/agent-settings/test_basic_settings.py
Show resolved
Hide resolved
Signed-off-by: Aleš Kalfas <[email protected]>
Signed-off-by: Aleš Kalfas <[email protected]>
Signed-off-by: Aleš Kalfas <[email protected]>
Signed-off-by: Aleš Kalfas <[email protected]>
b12fbda to
e9cb088
Compare
Signed-off-by: Aleš Kalfas <[email protected]>
Signed-off-by: Aleš Kalfas <[email protected]>
Signed-off-by: Aleš Kalfas <[email protected]>
bf750f0 to
44c5213
Compare
Linked Issues
#2008