mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-01 07:13:00 +00:00
chore: clean up redundant inline docs in a2a module
This commit is contained in:
@@ -98,7 +98,6 @@ class A2AErrorCode(IntEnum):
|
|||||||
"""The specified artifact was not found."""
|
"""The specified artifact was not found."""
|
||||||
|
|
||||||
|
|
||||||
# Error code to default message mapping
|
|
||||||
ERROR_MESSAGES: dict[int, str] = {
|
ERROR_MESSAGES: dict[int, str] = {
|
||||||
A2AErrorCode.JSON_PARSE_ERROR: "Parse error",
|
A2AErrorCode.JSON_PARSE_ERROR: "Parse error",
|
||||||
A2AErrorCode.INVALID_REQUEST: "Invalid Request",
|
A2AErrorCode.INVALID_REQUEST: "Invalid Request",
|
||||||
|
|||||||
@@ -63,25 +63,21 @@ class A2AExtension(Protocol):
|
|||||||
Example:
|
Example:
|
||||||
class MyExtension:
|
class MyExtension:
|
||||||
def inject_tools(self, agent: Agent) -> None:
|
def inject_tools(self, agent: Agent) -> None:
|
||||||
# Add custom tools to the agent
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def extract_state_from_history(
|
def extract_state_from_history(
|
||||||
self, conversation_history: Sequence[Message]
|
self, conversation_history: Sequence[Message]
|
||||||
) -> ConversationState | None:
|
) -> ConversationState | None:
|
||||||
# Extract state from conversation
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def augment_prompt(
|
def augment_prompt(
|
||||||
self, base_prompt: str, conversation_state: ConversationState | None
|
self, base_prompt: str, conversation_state: ConversationState | None
|
||||||
) -> str:
|
) -> str:
|
||||||
# Add custom instructions
|
|
||||||
return base_prompt
|
return base_prompt
|
||||||
|
|
||||||
def process_response(
|
def process_response(
|
||||||
self, agent_response: Any, conversation_state: ConversationState | None
|
self, agent_response: Any, conversation_state: ConversationState | None
|
||||||
) -> Any:
|
) -> Any:
|
||||||
# Modify response if needed
|
|
||||||
return agent_response
|
return agent_response
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ def extract_a2a_agent_ids_from_config(
|
|||||||
else:
|
else:
|
||||||
configs = a2a_config
|
configs = a2a_config
|
||||||
|
|
||||||
# Filter to only client configs (those with endpoint)
|
|
||||||
client_configs: list[A2AClientConfigTypes] = [
|
client_configs: list[A2AClientConfigTypes] = [
|
||||||
config for config in configs if isinstance(config, (A2AConfig, A2AClientConfig))
|
config for config in configs if isinstance(config, (A2AConfig, A2AClientConfig))
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user