Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/GPT3Discord/src/commit/c29103acfc81eee67408be0a37c4b1f0723ad22e/cogs/search_service_cog.py You should set ROOT_URL correctly, otherwise the web may not work correctly.
GPT3Discord/cogs/search_service_cog.py

33 lines
870 B

import traceback
import aiohttp
import discord
from models.deepl_model import TranslationModel
from models.search_model import Search
from services.environment_service import EnvService
ALLOWED_GUILDS = EnvService.get_allowed_guilds()
class SearchService(discord.Cog, name="SearchService"):
"""Cog containing translation commands and retrieval of translation services"""
def __init__(
self,
bot,
gpt_model,
pinecone_service,
):
super().__init__()
self.bot = bot
self.model = Search(gpt_model, pinecone_service)
# Make a mapping of all the country codes and their full country names:
async def search_command(self, ctx, query):
"""Command handler for the translation command"""
await ctx.defer()
await self.model.search(query)
await ctx.respond("ok")