Find answers from the community

v
versa
Offline, last seen 2 weeks ago
Joined October 8, 2024
We have our product documentation in markdown format. We'd like to split this doc into chunks based on markdown headers, then insert them on OpenSearch.

Our documentation has a format like:

Header

description

So its important that Header is chunked with its description

The main issue now is chunking, MarkdownNodeParser is not parsing correctly. Any suggestions? should i chunk manually?
5 comments
W
v
Hello team, how you guys doing?

I'm getting this error:
Plain Text
ERROR:root:2 validation errors for LLMChatStartEvent
messages.0
  Input should be a valid dictionary or instance of ChatMessage [type=model_type, input_value=ChatMessage(role=<Message... additional_kwargs=None), input_type=ChatMessage]


when trying to use llm.chat:

Plain Text
messages = [
      ChatMessage(
        role=MessageRole.SYSTEM,
        content=PromptTemplate((
          "Você é responsável por reformular e criar uma nova questão a partir de uma questão existente.\n" +
          "A questão criada deverá manter a mesma qualidade e relevância da questão original.\n" +
          "É necessário reforumular o conteúdo para apresentar variações em estilo, complexidade e contexto.\n" +
          "A questão original é a seguinte:\n" +
          "{question}\n" +
          "As alternativas são:\n" +
          "{alternatives}\n" 
          # "Os comentários do professor são:\n" +
          # "{comments}"
        )).format(
          question=parsed_question_text,
          alternatives=alternative_text,
          comments=question_comments
        )
      ),
      ChatMessage(
        role=MessageRole.USER,
        content=PromptTemplate((
          "Reformule a questão original e crie uma nova questão.\n" +
          "Retorne com a nova questão e as alternativas."
        ))
      )
    ]
3 comments
v
L
i keep getting this error: TypeError: object tuple can't be used in 'await' expression
6 comments
L
v
After a long time we've updated our llama-index version on python and we are doing the required fixes.

We were using synchronous Opensearch client but now it looks that it must be asynchronous, correct?
6 comments
L
v
v
versa
·

Bug

team, can you guys help me with this? I'm having this exact same error seen on this issue:
https://github.com/run-llama/llama_index/issues/12700
3 comments
L
Hello folks 🙂

i'm finally updating my llama-index version and i see that ServiceContext became deprecated.

I had the code seen on first image

Would that be the correct way to do it now? (second image)

Supposing i dont want to set Settings globally...
1 comment
v
v
versa
·

Llamaparse

Guys, yesterday i had llama parse returning an array of documents after parsing (as it should). Today is returning plain text and its breaking some stuff... any news on that?

Plain Text
 parser = LlamaParse(
                result_type="markdown",
                language="pt",
                premium_mode=True if mode == "premium" else False,
                split_by_page=False,
                disable_ocr=True,
                skip_diagonal_text=True,
                **parse_params,
            )

            start_parse = timer()

            file_extractor = {".pdf": parser}
            documents = SimpleDirectoryReader(
                input_files=[file_path], file_extractor=file_extractor
            ).load_data()
4 comments
W
v
Guys, llama parse accurate mode was very solid for me 2 weeks ago but in the past few days it isn't helping... am i the only one feeling like that?
12 comments
W
v
S
Hello again.
I'm having an issue parsing a PDF. This same parsing instructions and file used to work 2 weeks ago.

Job id is 4d3d72d7-ab11-4593-83e5-89672a1a523f

The parser seems to not work for tables that start in one page and ends in another page, i'll leave a screenshot.
This screenshot does not contain any sensitive information and its not private btw

Any ideas on a workaround?
3 comments
L
v
Hello folks, i'm having this issue where llama parse on Fast and Accurate mode is not executing parsing instructions

https://github.com/run-llama/llama_parse/issues/427
1 comment
L