Skip to content

Commit

Permalink
Merge pull request #2098 from solliancenet/cj-fix-custom-workflow
Browse files Browse the repository at this point in the history
Fix parameter type for external agent workflow
  • Loading branch information
ciprianjichici authored Dec 20, 2024
2 parents b5950ec + 168e567 commit 1d16fa1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
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

0 comments on commit 1d16fa1

Please sign in to comment.