Find answers from the community

Home
Members
345ishaan
3
345ishaan
Offline, last seen 2 months ago
Joined September 25, 2024
is it possible to pass Pydantic BaseModel as a tool input? it seems it is not supported as per the error
Plain Text
    raise RuntimeError(f'no validator found for {type_}, see `arbitrary_types_allowed` in Config')
RuntimeError: no validator found for <clas
16 comments
3
L
k
3
345ishaan
·

Split

Hi, I am trying to use CodeHierarchyLlamaPack to create nodes for this repo: https://github.com/real-stanford/diffusion_policy . I am trying to use all python files. It seems to be failing at:
Plain Text
 File "/Users/ig/Documents/llm_infra/llm_infra/lib/python3.11/site-packages/llama_index/packs/code_hierarchy/code_hierarchy.py", line 577, in _parse_nodes
    new_split_nodes[0].id_ = original_node.id_
    ~~~~~~~~~~~~~~~^^^
IndexError: list index out of range


I tried for some other repos where it seems to work well.
1 comment
L
3
345ishaan
·

Streaming

Hi, when i try to run stream_chat and chat for an OpenAIAgent created via https://github.com/run-llama/llama_index/blob/a0d793aa07c8baf9683cf682f07b712f56971db5/llama-index-integrations/agent/llama-index-agent-openai/llama_index/agent/openai/base.py#L33 I don't see any difference in behavior.

PS: I don't trying to debug why the agent i am creating doesn't yield streaming response at frontend. i.e. the frontend is recieving the full response all at once from backend after i setup webSocket.
1 comment
L
are there any llamaindex tutorials/guides for structured information extraction task, where you can extract information from unstructured documents like corporate merger, SEC filings etc.? What is the underlying techniques required to figure out the schema and then extract data?
1 comment
W
Is there a recording for this webinar available? https://lu.ma/kqxmbuou?
1 comment
L
Hi, I am trying to use CodeSplitter package to split https://github.com/princeton-nlp/SWE-agent but getting this error:L
Plain Text
llm_infra/lib/python3.11/site-packages/llama_index/core/node_parser/text/code.py", line 161, in split_text
    raise ValueError(f"Could not parse code with language {self.language}.")
ValueError: Could not parse code with language python.


any one tried using it?
1 comment
3
Hi, I am trying to use GithubRepositoryReader here: https://docs.llamaindex.ai/en/stable/examples/data_connectors/GithubRepositoryReaderDemo.html
like this:
Plain Text
github_client = GithubClient(github_token=GITHUB_TOKEN, verbose=True)
documents = GithubRepositoryReader(
        github_client=github_client,
        owner="jerryjliu",
        repo="llama_index",
        use_parser=False,
        verbose=False,
        filter_directories=(["examples", "tests", "logs"], GithubRepositoryReader.FilterType.EXCLUDE),
        filter_file_extensions=(
            GithubRepositoryReader.FilterType.EXCLUDE,
        ),
    ).load_data(branch='main')
    print(len(documents))

But getting this error:
Plain Text
  File "/Users/ig/.pyenv/versions/3.11.3/lib/python3.11/asyncio/futures.py", line 203, in result
    raise self._exception.with_traceback(self._exception_tb)
  File "/Users/ig/.pyenv/versions/3.11.3/lib/python3.11/asyncio/tasks.py", line 267, in __step
    result = coro.send(None)
             ^^^^^^^^^^^^^^^
  File "/Users/ig/Documents/llm_infra/llm_infra/lib/python3.11/site-packages/llama_index/readers/github/repository/github_client.py", line 361, in get_branch
    return GitBranchResponseModel.from_json(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ig/Documents/llm_infra/llm_infra/lib/python3.11/site-packages/dataclasses_json/api.py", line 63, in from_json
    return cls.from_dict(kvs, infer_missing=infer_missing)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ig/Documents/llm_infra/llm_infra/lib/python3.11/site-packages/dataclasses_json/api.py", line 70, in from_dict
    return _decode_dataclass(cls, kvs, infer_missing)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ig/Documents/llm_infra/llm_infra/lib/python3.11/site-packages/dataclasses_json/core.py", line 172, in _decode_dataclass
    field_value = kvs[field.name]
                  ~~~^^^^^^^^^^^^
KeyError: 'commit'

getting same error on other repos
17 comments
3
L