mirror of
https://github.com/EvolutionAPI/adk-python.git
synced 2025-07-13 15:14:50 -06:00
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:
parent
e99f87de73
commit
433c423d35
@ -41,6 +41,13 @@ echo '---------------------------------------'
|
|||||||
isort tests/
|
isort tests/
|
||||||
echo 'All done! ✨ 🍰 ✨'
|
echo 'All done! ✨ 🍰 ✨'
|
||||||
|
|
||||||
|
echo '---------------------------------------'
|
||||||
|
echo '| Organizing imports for contributing/...'
|
||||||
|
echo '---------------------------------------'
|
||||||
|
|
||||||
|
isort contributing/
|
||||||
|
echo 'All done! ✨ 🍰 ✨'
|
||||||
|
|
||||||
echo '---------------------------------------'
|
echo '---------------------------------------'
|
||||||
echo '| Auto-formatting src/...'
|
echo '| Auto-formatting src/...'
|
||||||
echo '---------------------------------------'
|
echo '---------------------------------------'
|
||||||
@ -52,3 +59,9 @@ echo '| Auto-formatting tests/...'
|
|||||||
echo '---------------------------------------'
|
echo '---------------------------------------'
|
||||||
|
|
||||||
find -L tests/ -type f -name "*.py" -exec pyink --config pyproject.toml {} +
|
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 {} +
|
||||||
|
@ -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'."""
|
"""Saves the provided query string as a 'text/plain' artifact named 'query'."""
|
||||||
query_bytes = query.encode('utf-8')
|
query_bytes = query.encode('utf-8')
|
||||||
artifact_part = types.Part(
|
artifact_part = types.Part(
|
||||||
inline_data=types.Blob(
|
inline_data=types.Blob(mime_type='text/plain', data=query_bytes)
|
||||||
mime_type='text/plain',
|
|
||||||
data=query_bytes
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
await tool_context.save_artifact('query', artifact_part)
|
await tool_context.save_artifact('query', artifact_part)
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ from google.adk.tools.bigquery import BigQueryCredentialsConfig
|
|||||||
from google.adk.tools.bigquery import BigQueryToolset
|
from google.adk.tools.bigquery import BigQueryToolset
|
||||||
import google.auth
|
import google.auth
|
||||||
|
|
||||||
|
|
||||||
RUN_WITH_ADC = False
|
RUN_WITH_ADC = False
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,12 +12,11 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from google.genai import Client
|
|
||||||
from google.genai import types
|
|
||||||
|
|
||||||
from google.adk import Agent
|
from google.adk import Agent
|
||||||
from google.adk.tools import load_artifacts
|
from google.adk.tools import load_artifacts
|
||||||
from google.adk.tools import ToolContext
|
from google.adk.tools import ToolContext
|
||||||
|
from google.genai import Client
|
||||||
|
from google.genai import types
|
||||||
|
|
||||||
# Only Vertex AI supports image generation for now.
|
# Only Vertex AI supports image generation for now.
|
||||||
client = Client()
|
client = Client()
|
||||||
|
@ -12,10 +12,9 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from google.genai import Client
|
|
||||||
|
|
||||||
from google.adk import Agent
|
from google.adk import Agent
|
||||||
from google.adk.tools import google_search
|
from google.adk.tools import google_search
|
||||||
|
from google.genai import Client
|
||||||
|
|
||||||
# Only Vertex AI supports image generation for now.
|
# Only Vertex AI supports image generation for now.
|
||||||
client = Client()
|
client = Client()
|
||||||
|
@ -65,6 +65,7 @@ async def check_prime(nums: list[int]) -> str:
|
|||||||
else f"{', '.join(str(num) for num in primes)} are prime numbers."
|
else f"{', '.join(str(num) for num in primes)} are prime numbers."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
root_agent = Agent(
|
root_agent = Agent(
|
||||||
model='gemini-2.0-flash',
|
model='gemini-2.0-flash',
|
||||||
name='data_processing_agent',
|
name='data_processing_agent',
|
||||||
|
@ -13,25 +13,23 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
import os
|
||||||
|
from typing import Any
|
||||||
|
from typing import Union
|
||||||
|
|
||||||
import agent
|
import agent
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from typing import Any
|
|
||||||
from typing import Union
|
|
||||||
from google.adk.agents import Agent
|
from google.adk.agents import Agent
|
||||||
from google.adk.events import Event
|
from google.adk.events import Event
|
||||||
from google.adk.runners import Runner
|
from google.adk.runners import Runner
|
||||||
from google.adk.tools import LongRunningFunctionTool
|
|
||||||
from google.adk.sessions import InMemorySessionService
|
from google.adk.sessions import InMemorySessionService
|
||||||
|
from google.adk.tools import LongRunningFunctionTool
|
||||||
from google.genai import types
|
from google.genai import types
|
||||||
|
|
||||||
import os
|
|
||||||
from opentelemetry import trace
|
from opentelemetry import trace
|
||||||
from opentelemetry.exporter.cloud_trace import CloudTraceSpanExporter
|
from opentelemetry.exporter.cloud_trace import CloudTraceSpanExporter
|
||||||
from opentelemetry.sdk.trace import export
|
from opentelemetry.sdk.trace import export
|
||||||
from opentelemetry.sdk.trace import TracerProvider
|
from opentelemetry.sdk.trace import TracerProvider
|
||||||
|
|
||||||
|
|
||||||
load_dotenv(override=True)
|
load_dotenv(override=True)
|
||||||
|
|
||||||
APP_NAME = "human_in_the_loop"
|
APP_NAME = "human_in_the_loop"
|
||||||
|
@ -13,12 +13,13 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from google.adk.agents import Agent
|
from google.adk.agents import Agent
|
||||||
|
|
||||||
from .tools import jira_tool
|
from .tools import jira_tool
|
||||||
|
|
||||||
root_agent = Agent(
|
root_agent = Agent(
|
||||||
model='gemini-2.0-flash-001',
|
model='gemini-2.0-flash-001',
|
||||||
name='jira_connector_agent',
|
name='jira_connector_agent',
|
||||||
description="This agent helps search issues in JIRA",
|
description='This agent helps search issues in JIRA',
|
||||||
instruction="""
|
instruction="""
|
||||||
To start with, greet the user
|
To start with, greet the user
|
||||||
First, you will be given a description of what you can do.
|
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.
|
- I currently support only **GET** and **LIST** operations.
|
||||||
""",
|
""",
|
||||||
tools=jira_tool.get_tools(),
|
tools=jira_tool.get_tools(),
|
||||||
|
|
||||||
)
|
)
|
||||||
|
@ -17,7 +17,7 @@ from google.adk.tools.application_integration_tool.application_integration_tools
|
|||||||
jira_tool = ApplicationIntegrationToolset(
|
jira_tool = ApplicationIntegrationToolset(
|
||||||
project="your-gcp-project-id", # replace with your GCP project ID
|
project="your-gcp-project-id", # replace with your GCP project ID
|
||||||
location="your-regions", # replace your regions
|
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={
|
entity_operations={
|
||||||
"Issues": ["GET", "LIST"],
|
"Issues": ["GET", "LIST"],
|
||||||
},
|
},
|
||||||
@ -30,5 +30,4 @@ jira_tool = ApplicationIntegrationToolset(
|
|||||||
This tool is to call an integration to search for issues in JIRA
|
This tool is to call an integration to search for issues in JIRA
|
||||||
|
|
||||||
""",
|
""",
|
||||||
|
|
||||||
)
|
)
|
||||||
|
@ -16,6 +16,7 @@ import asyncio
|
|||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from mcp.server.fastmcp import FastMCP
|
from mcp.server.fastmcp import FastMCP
|
||||||
|
|
||||||
# Create an MCP server with a name
|
# Create an MCP server with a name
|
||||||
|
@ -16,6 +16,7 @@ import asyncio
|
|||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from mcp.server.fastmcp import FastMCP
|
from mcp.server.fastmcp import FastMCP
|
||||||
|
|
||||||
# Create an MCP server with a name
|
# Create an MCP server with a name
|
||||||
|
@ -65,6 +65,7 @@ async def check_prime(nums: list[int]) -> str:
|
|||||||
else f"{', '.join(str(num) for num in primes)} are prime numbers."
|
else f"{', '.join(str(num) for num in primes)} are prime numbers."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
root_agent = Agent(
|
root_agent = Agent(
|
||||||
model='gemini-2.0-flash',
|
model='gemini-2.0-flash',
|
||||||
name='data_processing_agent',
|
name='data_processing_agent',
|
||||||
|
@ -27,9 +27,9 @@ from opentelemetry.exporter.cloud_trace import CloudTraceSpanExporter
|
|||||||
from opentelemetry.sdk.trace import export
|
from opentelemetry.sdk.trace import export
|
||||||
from opentelemetry.sdk.trace import TracerProvider
|
from opentelemetry.sdk.trace import TracerProvider
|
||||||
|
|
||||||
|
|
||||||
load_dotenv(override=True)
|
load_dotenv(override=True)
|
||||||
|
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
app_name = 'my_app'
|
app_name = 'my_app'
|
||||||
user_id_1 = 'user1'
|
user_id_1 = 'user1'
|
||||||
|
Loading…
Reference in New Issue
Block a user