-
Notifications
You must be signed in to change notification settings - Fork 20
add tools settings #1072
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
base: main
Are you sure you want to change the base?
add tools settings #1072
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,6 +52,8 @@ class AgentInternalToolType(str, Enum): | |
| """Agent internal tool type enumeration.""" | ||
|
|
||
| ANALYZE_FILES = "analyze-attachments" | ||
| DEEP_RAG = "deep-rag" | ||
| BATCH_TRANSFORM = "batch-transform" | ||
|
|
||
|
|
||
| class AgentEscalationRecipientType(str, Enum): | ||
|
|
@@ -397,12 +399,75 @@ class AgentIntegrationToolProperties(BaseResourceProperties): | |
| ) | ||
|
|
||
|
|
||
| class AgentInternalToolProperties(BaseResourceProperties): | ||
| """Agent internal tool properties model.""" | ||
| class AgentInternalDeepRagSettings(BaseCfg): | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there should be sub class based on context_type value (Annotated/Union) |
||
| """Agent internal DeepRAG tool settings model.""" | ||
|
|
||
| context_type: str = Field(..., alias="contextType") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be an enum |
||
| index_name: Optional[str] = Field(None, alias="indexName") | ||
| folder_path: Optional[str] = Field(None, alias="folderPath") | ||
|
Comment on lines
+406
to
+407
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we are not supporting deeprag with index mode as internal tool atm. only JIT/Attachments for now for DeepRAG Internal tool |
||
| query: Optional[AgentContextQuerySetting] = Field(None) | ||
| folder_path_prefix: Optional[AgentContextQuerySetting] = Field( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| None, alias="folderPathPrefix" | ||
| ) | ||
| citation_mode: Optional[AgentContextValueSetting] = Field( | ||
| None, alias="citationMode" | ||
| ) | ||
| file_extension: Optional[AgentContextValueSetting] = Field( | ||
| None, alias="fileExtension" | ||
| ) | ||
|
Comment on lines
+412
to
+417
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AgentContextValueSetting has |
||
|
|
||
|
|
||
| class AgentInternalBatchTransformSettings(BaseCfg): | ||
| """Agent internal BatchTransform tool settings model.""" | ||
|
|
||
| context_type: str = Field(..., alias="contextType") | ||
| index_name: Optional[str] = Field(None, alias="indexName") | ||
| folder_path: Optional[str] = Field(None, alias="folderPath") | ||
|
Comment on lines
+420
to
+425
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comments as above |
||
| query: Optional[str] = Field(None) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is not string. it should be a model with variant and value and description |
||
| folder_path_prefix: Optional[str] = Field(None, alias="folderPathPrefix") | ||
| file_extension: Optional[str] = Field(None, alias="fileExtension") | ||
| use_web_search_grounding: bool = Field( | ||
| default=False, alias="useWebSearchGrounding" | ||
| ) | ||
| output_columns: Optional[List[AgentContextOutputColumn]] = Field( | ||
| None, alias="outputColumns" | ||
| ) | ||
|
|
||
|
|
||
| class AgentInternalAnalyzeFilesToolProperties(BaseResourceProperties): | ||
| """Agent internal analyze files tool properties model.""" | ||
|
|
||
| tool_type: Literal[AgentInternalToolType.ANALYZE_FILES] = Field( | ||
| ..., alias="toolType" | ||
| alias="toolType", default=AgentInternalToolType.ANALYZE_FILES, frozen=True | ||
| ) | ||
|
|
||
|
|
||
| class AgentInternalDeepRagToolProperties(BaseResourceProperties): | ||
| """Agent internal DeepRAG tool properties model.""" | ||
|
|
||
| tool_type: Literal[AgentInternalToolType.DEEP_RAG] = Field( | ||
| alias="toolType", default=AgentInternalToolType.DEEP_RAG, frozen=True | ||
| ) | ||
| settings: AgentInternalDeepRagSettings = Field(..., alias="settings") | ||
|
|
||
|
|
||
| class AgentInternalBatchTransformToolProperties(BaseResourceProperties): | ||
| """Agent internal BatchTransform tool properties model.""" | ||
|
|
||
| tool_type: Literal[AgentInternalToolType.BATCH_TRANSFORM] = Field( | ||
| alias="toolType", default=AgentInternalToolType.BATCH_TRANSFORM, frozen=True | ||
| ) | ||
| settings: AgentInternalBatchTransformSettings = Field(..., alias="settings") | ||
|
|
||
|
|
||
| AgentInternalToolProperties = Annotated[ | ||
| Union[ | ||
| AgentInternalAnalyzeFilesToolProperties, | ||
| AgentInternalDeepRagToolProperties, | ||
| AgentInternalBatchTransformToolProperties, | ||
| ], | ||
| Field(discriminator="tool_type"), | ||
| ] | ||
|
|
||
|
|
||
| class AgentIntegrationToolResourceConfig(BaseAgentToolResourceConfig): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
almost all properties should not be optional. they are required.