Skip to content

Commit

Permalink
Merge pull request #2127 from solliancenet/cjg-hm-ca-python
Browse files Browse the repository at this point in the history
Add content artifacts to message history and request objects access.
  • Loading branch information
ciprianjichici authored Jan 15, 2025
2 parents 18e4e0e + 3042382 commit 64aacd2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,8 @@ async def invoke_async(self, request: KnowledgeManagementCompletionRequest) -> C
for tool in agent.tools:
tools.append(tool_factory.get_tool(tool, request.objects, self.user_identity, self.config))

request.objects['message_history'] = request.message_history

# create the workflow
workflow_factory = WorkflowFactory(self.plugin_manager)
workflow = workflow_factory.get_workflow(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
from pydantic import BaseModel
from pydantic import BaseModel, Field
from typing import List, Optional

from foundationallm.models.orchestration import ContentArtifact

class MessageHistoryItem(BaseModel):
"""
Represents an historic message sender and text item.
Parameters
----------
sender : str
Expand All @@ -13,3 +16,4 @@ class MessageHistoryItem(BaseModel):
"""
sender: str
text: str
content_artifacts : Optional[List[ContentArtifact]] = []

0 comments on commit 64aacd2

Please sign in to comment.