From fa575073725d84cfe8b1e989e727a0cacc5aa2da Mon Sep 17 00:00:00 2001 From: Eric Zhu Date: Mon, 6 Jan 2025 16:21:04 -0800 Subject: [PATCH] Fix proto check --- python/pyproject.toml | 2 +- python/samples/core_chess_game/main.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index da8844840..7a69b4044 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -87,7 +87,7 @@ check = ["fmt", "lint", "pyright", "mypy", "coverage"] gen-proto = "python -m grpc_tools.protoc --python_out=./packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos --grpc_python_out=./packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos --mypy_out=./packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos --mypy_grpc_out=./packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos --proto_path ../protos/ agent_worker.proto --proto_path ../protos/ cloudevent.proto" -gen-proto-samples = "python -m grpc_tools.protoc --python_out=./packages/autogen-core/samples/protos --grpc_python_out=./packages/autogen-core/samples/protos --mypy_out=./packages/autogen-core/samples/protos --mypy_grpc_out=./packages/autogen-core/samples/protos --proto_path ../protos/ agent_events.proto" +gen-proto-samples = "python -m grpc_tools.protoc --python_out=./samples/core_xlang_hello_python_agent/protos --grpc_python_out=./samples/core_xlang_hello_python_agent/protos --mypy_out=./samples/core_xlang_hello_python_agent/protos --mypy_grpc_out=./samples/core_xlang_hello_python_agent/protos --proto_path ../protos/ agent_events.proto" markdown-code-lint = """python check_md_code_blocks.py ../README.md ./packages/autogen-core/docs/src/**/*.md""" diff --git a/python/samples/core_chess_game/main.py b/python/samples/core_chess_game/main.py index f8aad54a7..5d8cd69da 100644 --- a/python/samples/core_chess_game/main.py +++ b/python/samples/core_chess_game/main.py @@ -4,10 +4,11 @@ and make moves, and using a group chat manager to orchestrate the conversation." import argparse import asyncio -from dataclasses import dataclass import logging +from dataclasses import dataclass from typing import Annotated, Literal +from agents import ChatCompletionAgent from autogen_core import ( AgentId, AgentInstantiationContext, @@ -21,11 +22,11 @@ from autogen_core.models import SystemMessage from autogen_core.tools import FunctionTool from chess import BLACK, SQUARE_NAMES, WHITE, Board, Move from chess import piece_name as get_piece_name -from pydantic import BaseModel -from agents import ChatCompletionAgent from patterns import GroupChatManager +from pydantic import BaseModel from utils import get_chat_completion_client_from_envs + @dataclass class TextMessage(BaseModel): source: str