File tree Expand file tree Collapse file tree 13 files changed +34
-26
lines changed Expand file tree Collapse file tree 13 files changed +34
-26
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,13 @@ echo '---------------------------------------'
41
41
isort tests/
42
42
echo ' All done! ✨ 🍰 ✨'
43
43
44
+ echo ' ---------------------------------------'
45
+ echo ' | Organizing imports for contributing/...'
46
+ echo ' ---------------------------------------'
47
+
48
+ isort contributing/
49
+ echo ' All done! ✨ 🍰 ✨'
50
+
44
51
echo ' ---------------------------------------'
45
52
echo ' | Auto-formatting src/...'
46
53
echo ' ---------------------------------------'
@@ -52,3 +59,9 @@ echo '| Auto-formatting tests/...'
52
59
echo ' ---------------------------------------'
53
60
54
61
find -L tests/ -type f -name " *.py" -exec pyink --config pyproject.toml {} +
62
+
63
+ echo ' ---------------------------------------'
64
+ echo ' | Auto-formatting contributing/...'
65
+ echo ' ---------------------------------------'
66
+
67
+ find -L contributing/ -type f -name " *.py" -exec pyink --config pyproject.toml {} +
Original file line number Diff line number Diff line change 19
19
20
20
21
21
async def log_query (tool_context : ToolContext , query : str ):
22
- """Saves the provided query string as a 'text/plain' artifact named 'query'."""
23
- query_bytes = query .encode ('utf-8' )
24
- artifact_part = types .Part (
25
- inline_data = types .Blob (
26
- mime_type = 'text/plain' ,
27
- data = query_bytes
28
- )
29
- )
30
- await tool_context .save_artifact ('query' , artifact_part )
22
+ """Saves the provided query string as a 'text/plain' artifact named 'query'."""
23
+ query_bytes = query .encode ('utf-8' )
24
+ artifact_part = types .Part (
25
+ inline_data = types .Blob (mime_type = 'text/plain' , data = query_bytes )
26
+ )
27
+ await tool_context .save_artifact ('query' , artifact_part )
31
28
32
29
33
30
root_agent = Agent (
Original file line number Diff line number Diff line change 19
19
from google .adk .tools .bigquery import BigQueryToolset
20
20
import google .auth
21
21
22
-
23
22
RUN_WITH_ADC = False
24
23
25
24
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- from google .genai import Client
16
- from google .genai import types
17
-
18
15
from google .adk import Agent
19
16
from google .adk .tools import load_artifacts
20
17
from google .adk .tools import ToolContext
18
+ from google .genai import Client
19
+ from google .genai import types
21
20
22
21
# Only Vertex AI supports image generation for now.
23
22
client = Client ()
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- from google .genai import Client
16
-
17
15
from google .adk import Agent
18
16
from google .adk .tools import google_search
17
+ from google .genai import Client
19
18
20
19
# Only Vertex AI supports image generation for now.
21
20
client = Client ()
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ async def check_prime(nums: list[int]) -> str:
65
65
else f"{ ', ' .join (str (num ) for num in primes )} are prime numbers."
66
66
)
67
67
68
+
68
69
root_agent = Agent (
69
70
model = 'gemini-2.0-flash' ,
70
71
name = 'data_processing_agent' ,
Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
import asyncio
16
+ import os
17
+ from typing import Any
18
+ from typing import Union
16
19
17
20
import agent
18
21
from dotenv import load_dotenv
19
- from typing import Any
20
- from typing import Union
21
22
from google .adk .agents import Agent
22
23
from google .adk .events import Event
23
24
from google .adk .runners import Runner
24
- from google .adk .tools import LongRunningFunctionTool
25
25
from google .adk .sessions import InMemorySessionService
26
+ from google .adk .tools import LongRunningFunctionTool
26
27
from google .genai import types
27
-
28
- import os
29
28
from opentelemetry import trace
30
29
from opentelemetry .exporter .cloud_trace import CloudTraceSpanExporter
31
30
from opentelemetry .sdk .trace import export
32
31
from opentelemetry .sdk .trace import TracerProvider
33
32
34
-
35
33
load_dotenv (override = True )
36
34
37
35
APP_NAME = "human_in_the_loop"
Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
from google .adk .agents import Agent
16
+
16
17
from .tools import jira_tool
17
18
18
19
root_agent = Agent (
19
20
model = 'gemini-2.0-flash-001' ,
20
21
name = 'jira_connector_agent' ,
21
- description = " This agent helps search issues in JIRA" ,
22
+ description = ' This agent helps search issues in JIRA' ,
22
23
instruction = """
23
24
To start with, greet the user
24
25
First, you will be given a description of what you can do.
49
50
- I currently support only **GET** and **LIST** operations.
50
51
""" ,
51
52
tools = jira_tool .get_tools (),
52
-
53
53
)
Original file line number Diff line number Diff line change 17
17
jira_tool = ApplicationIntegrationToolset (
18
18
project = "your-gcp-project-id" , # replace with your GCP project ID
19
19
location = "your-regions" , # replace your regions
20
- connection = "your-integration-connection-name" , # replace with your connection name
20
+ connection = "your-integration-connection-name" , # replace with your connection name
21
21
entity_operations = {
22
22
"Issues" : ["GET" , "LIST" ],
23
23
},
30
30
This tool is to call an integration to search for issues in JIRA
31
31
32
32
""" ,
33
-
34
33
)
Original file line number Diff line number Diff line change 16
16
import os
17
17
from pathlib import Path
18
18
import sys
19
+
19
20
from mcp .server .fastmcp import FastMCP
20
21
21
22
# Create an MCP server with a name
Original file line number Diff line number Diff line change 16
16
import os
17
17
from pathlib import Path
18
18
import sys
19
+
19
20
from mcp .server .fastmcp import FastMCP
20
21
21
22
# Create an MCP server with a name
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ async def check_prime(nums: list[int]) -> str:
65
65
else f"{ ', ' .join (str (num ) for num in primes )} are prime numbers."
66
66
)
67
67
68
+
68
69
root_agent = Agent (
69
70
model = 'gemini-2.0-flash' ,
70
71
name = 'data_processing_agent' ,
Original file line number Diff line number Diff line change 27
27
from opentelemetry .sdk .trace import export
28
28
from opentelemetry .sdk .trace import TracerProvider
29
29
30
-
31
30
load_dotenv (override = True )
32
31
32
+
33
33
async <
2851
span class=pl-k>def main ():
34
34
app_name = 'my_app'
35
35
user_id_1 = 'user1'
You can’t perform that action at this time.
0 commit comments