@ -810,7 +810,14 @@ class Commands(discord.Cog, name="Commands"):
guild_ids=ALLOWED_GUILDS,
guild_ids=ALLOWED_GUILDS,
)
)
@discord.option(name="query",description="The query to search",required=True)
@discord.option(name="query",description="The query to search",required=True)
@discord.option(name="scope",description="How many top links to use for context",required=False,input_type=discord.SlashCommandOptionType.integer,max_value=8,min_value=1)
@discord.option(
name="scope",
description="How many top links to use for context",
"answer the question, say that you were unable to answer the question if there is not sufficient context to formulate a decisive answer. The search query was: {query_str}\n"
"answer the question, say that you were unable to answer the question if there is not sufficient context to formulate a decisive answer. The search query was: {query_str}\n"
)
)
self.openai_key=os.getenv("OPENAI_TOKEN")
self.openai_key=os.getenv("OPENAI_TOKEN")
defindex_webpage(self,url)->list[Document]:
defindex_webpage(self,url)->list[Document]:
documents=BeautifulSoupWebReader(
documents=BeautifulSoupWebReader(
website_extractor=DEFAULT_WEBSITE_EXTRACTOR
website_extractor=DEFAULT_WEBSITE_EXTRACTOR
@ -61,7 +67,9 @@ class Search:
# Concatenate all the text for a given website into one string and save it into an array:
# Concatenate all the text for a given website into one string and save it into an array: