Giter VIP home page Giter VIP logo

create_llama_projects's People

Contributors

eltociear avatar jerryjliu avatar marcusschiesser avatar mhenrichsen avatar wisdomtooth546 avatar yisding avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

create_llama_projects's Issues

Error on different html file

I get this error when i try with a different html file:
/usr/local/lib/python3.10/dist-packages/llama_index/node_parser/interface.py in get_nodes_from_documents(self, documents, show_progress, **kwargs)
65 if node.ref_doc_id is not None:
66 node.metadata.update(
---> 67 doc_id_to_document[node.ref_doc_id].metadata
68 )
69

KeyError: '415b458e-c002-4527-904e-71f214e77113'

Any pointers would be helpful? Is it something to do with html parsing. I downloaded a10k html document for a different company and tried the code

Error when building Multi-Document Agents via create-llama

Hi, so I'm running into issues with getting the backend to work for Multi-Document Agents. Developing this from a Windows (11 Home).

All I did was:

  1. Initialize the project using "yarn run llama"
  2. Selected multi-document-agents
  3. Followed the instructions on the backend README (poetry install, poetry shell, and added OPEN_AI_API key in a ".env" file).
  4. Ran "python main.py

And I get this error:

(base) (app-py3.11) PS C:\Users\USER\OneDrive\Documents\GitHub\PROJECT\backend> python main.py
Traceback (most recent call last):
  File "C:\Users\USER\OneDrive\Documents\GitHub\PROJECT\backend\main.py", line 4, in <module>
    from app.api.routers.chat import chat_router
  File "C:\Users\USER\OneDrive\Documents\GitHub\PROJECT\backend\app\api\routers\chat.py", line 9, in <module>
    from llama_index.llms.base import MessageRole, ChatMessage
ImportError: cannot import name 'MessageRole' from 'llama_index.llms.base' (C:\Users\USER\AppData\Local\pypoetry\Cache\virtualenvs\app-xadExt60-py3.11\Lib\site-packages\llama_index\llms\base.py)

Any idea what could be wrong here...?

Can't resolve './lib/utils'

@jerryjliu I got following error when building frontend. Is ./lib/utils missing in the code, or do I miss some step?

./app/components/ui/button.tsx:5:0
Module not found: Can't resolve './lib/utils'
  3 | import * as React from "react";
  4 | 
> 5 | import { cn } from "./lib/utils";
  6 | 
  7 | const buttonVariants = cva(
  8 |   "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./app/components/ui/chat/chat-input.tsx
./app/components/ui/chat/index.ts
./app/components/chat-section.tsx

No file/folder found for package llamaindex-fastapi-streaming

poetry install
Updating dependencies
Resolving dependencies... (8.1s)

No dependencies to install or update

Writing lock file

Installing the current project: llamaindex-fastapi-streaming (0.1.0)
The current project could not be installed: No file/folder found for package llamaindex-fastapi-streaming
If you do not want to install the current project use --no-root

When I run the code in the backend folder after cloning the repository.

OS: Ubuntu 22.04.3 LTS

Pip Freeze after poetry shell:

(llamaindex-fastapi-streaming-py3.11) :~/create_llama_projects/embedded-tables/backend$ pip freeze
aiohttp==3.8.6
aiosignal==1.3.1
aiostream==0.5.2
annotated-types==0.6.0
anyio==3.7.1
async-timeout==4.0.3
attrs==23.1.0
backoff==2.2.1
beautifulsoup4==4.12.2
certifi==2023.7.22
chardet==5.2.0
charset-normalizer==3.3.2
click==8.1.7
dataclasses-json==0.5.14
Deprecated==1.2.14
distro==1.8.0
emoji==2.8.0
fastapi==0.104.1
filetype==1.2.0
frozenlist==1.4.0
fsspec==2023.10.0
greenlet==3.0.1
h11==0.14.0
httpcore==1.0.2
httptools==0.6.1
httpx==0.25.1
idna==3.4
joblib==1.3.2
jsonpatch==1.33
jsonpointer==2.4
langchain==0.0.336
langdetect==1.0.9
langsmith==0.0.64
llama-index==0.8.69.post2
lxml==4.9.3
marshmallow==3.20.1
multidict==6.0.4
mypy-extensions==1.0.0
nest-asyncio==1.5.8
nltk==3.8.1
numpy==1.26.2
openai==1.3.2
packaging==23.2
pandas==2.1.3
pydantic==2.5.1
pydantic_core==2.14.3
pypdf==3.17.1
python-dateutil==2.8.2
python-dotenv==1.0.0
python-iso639==2023.6.15
python-magic==0.4.27
pytz==2023.3.post1
PyYAML==6.0.1
rapidfuzz==3.5.2
regex==2023.10.3
requests==2.31.0
six==1.16.0
sniffio==1.3.0
soupsieve==2.5
SQLAlchemy==2.0.23
starlette==0.27.0
tabulate==0.9.0
tenacity==8.2.3
tiktoken==0.5.1
tqdm==4.66.1
typing-inspect==0.9.0
typing_extensions==4.8.0
tzdata==2023.3
unstructured==0.10.30
urllib3==1.26.18
uvicorn==0.23.2
uvloop==0.19.0
watchfiles==0.21.0
websockets==12.0
wrapt==1.16.0
yarl==1.9.2

Maybe this causes errors later on.

Error when building index from tesla_2021_10k.htm

I'm trying on Mac and get this error,

ValueError: 3 columns passed, passed data had 5 columns

The error is throw from the following function

def html_to_df(html_str: str) -> pd.DataFrame:
    """Convert HTML to dataframe."""
    from lxml import html

    tree = html.fromstring(html_str)
    table_element = tree.xpath("//table")[0]
    rows = table_element.xpath(".//tr")

    data = []
    for row in rows:
        cols = row.xpath(".//td")
        cols = [c.text.strip() if c.text is not None else "" for c in cols]
        data.append(cols)

    return pd.DataFrame(data[1:], columns=data[0])

Where

  • html_str is "




    โ˜’
    ANNUAL REPORT PURSUANT TO SECTION 13 OR 15(d) OF THE SECURITIES EXCHANGE ACT OF 1934
    "
  • data[0] is "['', '', '']"
  • data[1] is "['', 'โ˜’', '', 'ANNUAL REPORT PURSUA...CT OF 1934', '']"

APITimeoutError

While indexing files, I get the error below. What do you think could be done to fix this?

/.cache/pypoetry/virtualenvs/llamaindex-fastapi-streaming-2J97Ot5s-py3.11/lib/python3.11/site-packages/openai/_base_client.py", line 887, in _request
    raise APITimeoutError(request=request) from err
openai.APITimeoutError: Request timed out.

When I restart it, it's back to normal. But after a while (like after 20 steps) request time out can happen.

Maybe cache the intermediate results and restart from the cache when time out happens. Don't you come across this?

Or is this related to something else?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.