Skip to content

Commit

Permalink
style: rename tool getPageContent
Browse files Browse the repository at this point in the history
  • Loading branch information
Neet-Nestor committed Oct 23, 2024
1 parent ea06237 commit d72ad30
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/retriever.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const getSelectedText = (state: State, parameters: {}): string => {
return state.currentSelection.toString();
};

export const getPageTextContent = (): string => {
export const getPageContent = (): string => {
if (document) {
return document.body.innerText || "";
}
Expand Down Expand Up @@ -94,23 +94,23 @@ export const retrievers: Record<string, Tool> = {
caller: CallerType.Any,
implementation: getSelectedText,
},
getPageTextContent: {
name: "getPageTextContent",
getPageContent: {
name: "getPageContent",
displayName: "Get Page Content",
description: "Fetch the entire text content of the current webpage.",
schema: {
type: "function",
function: {
name: "getPageTextContent",
name: "getPageContent",
description:
"getPageTextContent() -> str - Fetches the entire text content of the current webpage.\n\n Returns:\n str: The entire text content of the webpage.",
"getPageContent() -> str - Fetches the entire text content of the current webpage.\n\n Returns:\n str: The entire text content of the webpage.",
parameters: { type: "object", properties: {}, required: [] },
},
},
type: ToolType.Retriever,
scope: Scope.Any,
caller: CallerType.ContentScript,
implementation: getPageTextContent,
implementation: getPageContent,
},
getCalendarEvents: {
name: "getGoogleCalendarEvents",
Expand Down

0 comments on commit d72ad30

Please sign in to comment.