Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parameter type for external agent workflow #2098

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
Description: FoundationaLLM base class for tools that uses the AgentTool model for its configuration.
"""

from typing import List, Dict

# Platform imports
from azure.identity import DefaultAzureCredential
from logging import Logger
Expand All @@ -23,7 +25,7 @@ class FoundationaLLMToolBase(BaseTool):

response_format: str = 'content_and_artifact'

def __init__(self, tool_config: AgentTool, objects:dict, user_identity:UserIdentity, config: Configuration):
def __init__(self, tool_config: AgentTool, objects:Dict, user_identity:UserIdentity, config: Configuration):
""" Initializes the FoundationaLLMToolBase class with the tool configuration. """
super().__init__(
name=tool_config.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,27 @@
Description: FoundationaLLM base class for tools that uses the agent workflow model for its configuration.
"""
from abc import ABC, abstractmethod
from typing import List

from azure.identity import DefaultAzureCredential

from langchain_core.messages import BaseMessage
from typing import List

from foundationallm.config import Configuration, UserIdentity
from foundationallm.models.agents import AgentTool, ExternalAgentWorkflow
from foundationallm.models.orchestration import CompletionResponse
from foundationallm.telemetry import Telemetry

from .foundationallm_tool_base import FoundationaLLMToolBase

class FoundationaLLMWorkflowBase(ABC):
"""
FoundationaLLM base class for workflows that uses the agent workflow model for its configuration.
"""
def __init__(self,
workflow_config: ExternalAgentWorkflow,
objects: dict,
tools: List[AgentTool],
tools: List[FoundationaLLMToolBase],
user_identity: UserIdentity,
config: Configuration):
"""
Expand All @@ -30,7 +35,7 @@ def __init__(self,
The workflow assigned to the agent.
objects : dict
The exploded objects assigned from the agent.
tools : List[AgentTool]
tools : List[FoundationaLLMToolBase]
The tools assigned to the agent.
user_identity : UserIdentity
The user identity of the user initiating the request.
Expand Down
Loading