Browse Source

Fix proto check

pull/4911/head
Eric Zhu 1 year ago
parent
commit
fa57507372
2 changed files with 5 additions and 4 deletions
  1. +1
    -1
      python/pyproject.toml
  2. +4
    -3
      python/samples/core_chess_game/main.py

+ 1
- 1
python/pyproject.toml View File

@@ -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"""



+ 4
- 3
python/samples/core_chess_game/main.py View File

@@ -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


Loading…
Cancel
Save