-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Add universal remoteKnowledgeSource, add notion and website tool
Signed-off-by: Daishan Peng <[email protected]>
- Loading branch information
1 parent
1a0e190
commit e41b306
Showing
21 changed files
with
1,283 additions
and
749 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package types | ||
|
||
var ( | ||
RemoteKnowledgeSourceTypeOneDrive RemoteKnowledgeSourceType = "onedrive" | ||
RemoteKnowledgeSourceTypeNotion RemoteKnowledgeSourceType = "notion" | ||
RemoteKnowledgeSourceTypeWebsite RemoteKnowledgeSourceType = "website" | ||
) | ||
|
||
type RemoteKnowledgeSourceType string | ||
|
||
type RemoteKnowledgeSource struct { | ||
Metadata | ||
AgentID string `json:"agentID,omitempty"` | ||
WorkflowID string `json:"workflowID,omitempty"` | ||
ThreadID string `json:"threadID,omitempty"` | ||
RunID string `json:"runID,omitempty"` | ||
Input RemoteKnowledgeSourceInput `json:"input,omitempty"` | ||
State RemoteKnowledgeSourceState `json:"state,omitempty"` | ||
Status string `json:"status,omitempty"` | ||
Error string `json:"error,omitempty"` | ||
} | ||
|
||
type RemoteKnowledgeSourceList List[RemoteKnowledgeSource] | ||
|
||
type RemoteKnowledgeSourceInput struct { | ||
SourceType RemoteKnowledgeSourceType `json:"sourceType,omitempty"` | ||
Exclude []string `json:"exclude,omitempty"` | ||
OneDriveConfig *OneDriveConfig `json:"onedriveConfig,omitempty"` | ||
NotionConfig *NotionConfig `json:"notionConfig,omitempty"` | ||
WebsiteCrawlingConfig *WebsiteCrawlingConfig `json:"websiteCrawlingConfig,omitempty"` | ||
} | ||
|
||
type OneDriveConfig struct { | ||
SharedLinks []string `json:"sharedLinks,omitempty"` | ||
} | ||
|
||
type NotionConfig struct { | ||
Pages []string `json:"pages,omitempty"` | ||
} | ||
|
||
type WebsiteCrawlingConfig struct { | ||
URLs []string `json:"urls,omitempty"` | ||
} | ||
|
||
type RemoteKnowledgeSourceState struct { | ||
OneDriveState *OneDriveLinksConnectorState `json:"onedriveState,omitempty"` | ||
NotionState *NotionConnectorState `json:"notionState,omitempty"` | ||
WebsiteCrawlingState *WebsiteCrawlingConnectorState `json:"websiteCrawlingState,omitempty"` | ||
} | ||
|
||
type OneDriveLinksConnectorState struct { | ||
Folders FolderSet `json:"folders,omitempty"` | ||
} | ||
|
||
type NotionConnectorState struct { | ||
Pages map[string]NotionPage `json:"pages,omitempty"` | ||
} | ||
|
||
type NotionPage struct { | ||
URL string `json:"url,omitempty"` | ||
Title string `json:"title,omitempty"` | ||
} | ||
|
||
type WebsiteCrawlingConnectorState struct { | ||
ScrapeJobIds map[string]string `json:"scrapeJobIds"` | ||
Folders FolderSet `json:"folders"` | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.