theodo-group / LLPhant

LLPhant - A comprehensive PHP Generative AI Framework using OpenAI GPT 4. Inspired by Langchain
MIT License
766 stars 78 forks source link

TypeError: LLPhant\Embeddings\DataReader\DocxReader::toString() #209

Closed Vardan9898 closed 2 weeks ago

Vardan9898 commented 3 weeks ago

Hello everyone,

I encountered an error while trying to upload a DOCX file. Below is the error message I received. Does anyone have any suggestions on how to fix this?

Error: TypeError: LLPhant\Embeddings\DataReader\DocxReader::toString(): Argument #1 ($text) must be of type array|string|null, PhpOffice\PhpWord\Element\TextRun given, called in /home/vardan/projects/aminos/vendor/theodo-group/llphant/src/Embeddings/DataReader/DocxReader.php on line 29 and defined in /home/vardan/projects/aminos/vendor/theodo-group/llphant/src/Embeddings/DataReader/DocxReader.php:55 Stack trace:

0 /home/vardan/projects/aminos/vendor/theodo-group/llphant/src/Embeddings/DataReader/DocxReader.php(29):

BUSI 1815 Introduction to Entrepreneurship.docx

f-lombardo commented 2 weeks ago

@Vardan9898 Please check if this PR fixes your problem: https://github.com/theodo-group/LLPhant/pull/211

Vardan9898 commented 2 weeks ago

@f-lombardo Yes, it fixes the issue. Thanks! I’ll wait for it to be merged.

MaximeThoonsen commented 2 weeks ago

@Vardan9898 it is merged. Thanks guys !