docs: update Gemini snippets to google-genai#92
Conversation
|
Hi @kunal-9090, thanks for picking up #88 and for getting the import swap direction right, That said, this can't merge in its current state. The problem is that the code examples went from complete (but old API) to incomplete (new API). In every skill doc, the model invocation was replaced with a comment stub like:
A comment is not a working example. A contributor following these docs to integrate a skill with Gemini would end up with no tools attached to the model at all. The same applies to The fix needed is to complete each example with a real import google.genai as genai
from google.genai import types
client = genai.Client(api_key=os.environ["GOOGLE_API_KEY"])
response = client.models.generate_content(
model="gemini-2.5-flash",
contents="Screen wallet 0xd8dA... for risks.",
config=types.GenerateContentConfig(
tools=[SkillLoader.to_gemini_tool(bundle)],
system_instruction=bundle["instructions"],
),
)This pattern should be consistent across |
|
Thanks for the detailed review. I completed the Gemini examples with real \client.models.generate_content(..., config=types.GenerateContentConfig(...))\ calls across README, usage docs, and skill pages, and tightened the manual loop example in \docs/usage/gemini.md. \python -m compileall skillware skills tests\ passes; full pytest collection is currently blocked locally by missing optional deps: \ollama, \�s4, and \itz. |
|
Thanks for iterating on the feedback, the direction is right: Before we merge, we need the examples to be fully runnable end-to-end, consistent with the rest of the repo ( Please tighten the following:
Once those are addressed, we’ll review again and merge if everything aligns. Good work so far, you’re close. |
|
Thanks for the follow-up review. I updated the Gemini docs/examples to show the full tool response continuation after local Skillware execution, removed the stale old-SDK automatic function calling wording from docs/usage/gemini.md, kept the follow-up docs-only, and aligned the snippets on genai.Client() with gemini-2.5-flash. Verified with git diff --check and python -m compileall skillware skills tests. |
Summary
Closes #88
Checks