chore: include contributing/ folder in autoformat.sh

Also formatted the files in that folder in this same commit.

PiperOrigin-RevId: 766885306
This commit is contained in:
Liang Wu 2025-06-03 17:20:16 -07:00 committed by Copybara-Service
parent e99f87de73
commit 433c423d35
13 changed files with 34 additions and 26 deletions

View File

@ -41,6 +41,13 @@ echo '---------------------------------------'
isort tests/
echo 'All done! ✨ 🍰 ✨'
echo '---------------------------------------'
echo '| Organizing imports for contributing/...'
echo '---------------------------------------'
isort contributing/
echo 'All done! ✨ 🍰 ✨'
echo '---------------------------------------'
echo '| Auto-formatting src/...'
echo '---------------------------------------'
@ -52,3 +59,9 @@ echo '| Auto-formatting tests/...'
echo '---------------------------------------'
find -L tests/ -type f -name "*.py" -exec pyink --config pyproject.toml {} +
echo '---------------------------------------'
echo '| Auto-formatting contributing/...'
echo '---------------------------------------'
find -L contributing/ -type f -name "*.py" -exec pyink --config pyproject.toml {} +

View File

@ -22,10 +22,7 @@ async def log_query(tool_context: ToolContext, query: str):
"""Saves the provided query string as a 'text/plain' artifact named 'query'."""
query_bytes = query.encode('utf-8')
artifact_part = types.Part(
inline_data=types.Blob(
mime_type='text/plain',
data=query_bytes
)
inline_data=types.Blob(mime_type='text/plain', data=query_bytes)
)
await tool_context.save_artifact('query', artifact_part)

View File

@ -19,7 +19,6 @@ from google.adk.tools.bigquery import BigQueryCredentialsConfig
from google.adk.tools.bigquery import BigQueryToolset
import google.auth
RUN_WITH_ADC = False

View File

@ -12,12 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from google.genai import Client
from google.genai import types
from google.adk import Agent
from google.adk.tools import load_artifacts
from google.adk.tools import ToolContext
from google.genai import Client
from google.genai import types
# Only Vertex AI supports image generation for now.
client = Client()

View File

@ -12,10 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from google.genai import Client
from google.adk import Agent
from google.adk.tools import google_search
from google.genai import Client
# Only Vertex AI supports image generation for now.
client = Client()

View File

@ -65,6 +65,7 @@ async def check_prime(nums: list[int]) -> str:
else f"{', '.join(str(num) for num in primes)} are prime numbers."
)
root_agent = Agent(
model='gemini-2.0-flash',
name='data_processing_agent',

View File

@ -13,25 +13,23 @@
# limitations under the License.
import asyncio
import os
from typing import Any
from typing import Union
import agent
from dotenv import load_dotenv
from typing import Any
from typing import Union
from google.adk.agents import Agent
from google.adk.events import Event
from google.adk.runners import Runner
from google.adk.tools import LongRunningFunctionTool
from google.adk.sessions import InMemorySessionService
from google.adk.tools import LongRunningFunctionTool
from google.genai import types
import os
from opentelemetry import trace
from opentelemetry.exporter.cloud_trace import CloudTraceSpanExporter
from opentelemetry.sdk.trace import export
from opentelemetry.sdk.trace import TracerProvider
load_dotenv(override=True)
APP_NAME = "human_in_the_loop"

View File

@ -13,12 +13,13 @@
# limitations under the License.
from google.adk.agents import Agent
from .tools import jira_tool
root_agent = Agent(
model='gemini-2.0-flash-001',
name='jira_connector_agent',
description="This agent helps search issues in JIRA",
description='This agent helps search issues in JIRA',
instruction="""
To start with, greet the user
First, you will be given a description of what you can do.
@ -49,5 +50,4 @@ root_agent = Agent(
- I currently support only **GET** and **LIST** operations.
""",
tools=jira_tool.get_tools(),
)

View File

@ -17,7 +17,7 @@ from google.adk.tools.application_integration_tool.application_integration_tools
jira_tool = ApplicationIntegrationToolset(
project="your-gcp-project-id", # replace with your GCP project ID
location="your-regions", # replace your regions
connection="your-integration-connection-name", #replace with your connection name
connection="your-integration-connection-name", # replace with your connection name
entity_operations={
"Issues": ["GET", "LIST"],
},
@ -30,5 +30,4 @@ jira_tool = ApplicationIntegrationToolset(
This tool is to call an integration to search for issues in JIRA
""",
)

View File

@ -16,6 +16,7 @@ import asyncio
import os
from pathlib import Path
import sys
from mcp.server.fastmcp import FastMCP
# Create an MCP server with a name

View File

@ -16,6 +16,7 @@ import asyncio
import os
from pathlib import Path
import sys
from mcp.server.fastmcp import FastMCP
# Create an MCP server with a name

View File

@ -65,6 +65,7 @@ async def check_prime(nums: list[int]) -> str:
else f"{', '.join(str(num) for num in primes)} are prime numbers."
)
root_agent = Agent(
model='gemini-2.0-flash',
name='data_processing_agent',

View File

@ -27,9 +27,9 @@ from opentelemetry.exporter.cloud_trace import CloudTraceSpanExporter
from opentelemetry.sdk.trace import export
from opentelemetry.sdk.trace import TracerProvider
load_dotenv(override=True)
async def main():
app_name = 'my_app'
user_id_1 = 'user1'