JordieB / landy

GNU General Public License v3.0
0 stars 0 forks source link

[B] TypeError: unsupported operand type(s) for +: 'OpenAIEmbeddings' and 'str' #7

Closed JordieB closed 1 year ago

JordieB commented 1 year ago

[2023-05-01 10:14:37,577] [ERROR] discord.ext.commands.bot: Ignoring exception in command ask Traceback (most recent call last): File "/opt/saturncloud/envs/saturn/lib/python3.9/site-packages/discord/ext/commands/core.py", line 229, in wrapped ret = await coro(*args, **kwargs) File "/home/jovyan/workspace/seria/src/seria/bot.py", line 29, in ask answer = lc.ask_doc_based_question(posts, question) File "/home/jovyan/workspace/seria/src/seria/utils/lc_handler.py", line 83, in ask_doc_based_question self.create_chroma_db(self.docs, self.embedder) File "/home/jovyan/workspace/seria/src/seria/utils/lc_handler.py", line 52, in create_chroma_db if os.path.isdir(persist_directory + '/index'): TypeError: unsupported operand type(s) for +: 'OpenAIEmbeddings' and 'str'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/opt/saturncloud/envs/saturn/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 1350, in invoke await ctx.command.invoke(ctx) File "/opt/saturncloud/envs/saturn/lib/python3.9/site-packages/discord/ext/commands/core.py", line 1023, in invoke await injected(*ctx.args, **ctx.kwargs) # type: ignore File "/opt/saturncloud/envs/saturn/lib/python3.9/site-packages/discord/ext/commands/core.py", line 238, in wrapped raise CommandInvokeError(exc) from exc discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: unsupported operand type(s) for +: 'OpenAIEmbeddings' and 'str'