pythonagentai's Introduction
pythonagentai's People
Forkers
leadpiggy tiktaak gwd666 dw2382 iamkrishnagupta10 amarouane-abdelhak mwolff89 smaiti1 will-h007 marcio-costa doublevanos solnone geeky-muhtasim ianyliu oscardejong wastaboy clic-ethiopia thefriedbee adedayoominiyi steelheart mdwoicke izzyx6 soderalohastrom rajan-personal seanreed1111 kaburu12 jonathanlc19 hengwoo torque-ace tacigomess henri-edh glaceage squareandcompass markrhene rxyknight lsabnani suryashekhawat faisal-523 zainarif00456 kaushalprasadhial caguerreroa orandolph8 jnecke bijeshshrestha gowthamchowdry94 mahir-islam sahilbhange machuge27 bhohbaum joserfjuniorllms phamxuansy ptzagk walrusofcomms zhandong-y kelvinthai gkrafft2 dwiwekan morteningemann86 w4ester ravitejaneravati adrianh31 sayantan-sanyal-ds rh77cloud leecheedoo nitrammal zccheng97 canferman iosub taratran mamanaras decodesur007 arielkru gswoods joem4christ fikri443 gab-e-ai chongsuhpark pavithragithub29 temic137 sagevincepythonagentai's Issues
Unable to use dot env
while installing we used
pip3 install python-dotenv
but in the main.py file we use
import dotenv
this is giving me errors as VScode says that dotenv is not installed
and when I try to install it I get this error
Collecting dotenv
Using cached dotenv-0.0.5.tar.gz (2.4 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> [33 lines of output]
Collecting wheel
Using cached wheel-0.43.0-py3-none-any.whl.metadata (2.2 kB)
Collecting distribute
Using cached distribute-0.7.3.zip (145 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'dist_info'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> See above for output. ```
I even tried using
``` pip3 install python-dotenv ``` but I still get the same error
population_df = pd.read_csv(population_path, index_col="id")
Hi,
I notice i got better results if i specified the first column id. if i dont do this it dos not seem to index properly with pandas
ImportError: cannot import name 'ChatMessage' from 'llama_index.core.llms' (unknown location)
error:
Traceback (most recent call last): File "/Users/ahmednadiir/Desktop/agency/main.py", line 4, in <module> from llama_index.core.query_engine import PandasQueryEngine File "/Users/ahmednadiir/Desktop/agency/ai/lib/python3.11/site-packages/llama_index/__init__.py", line 13, in <module> from llama_index.callbacks.global_handlers import set_global_handler File "/Users/ahmednadiir/Desktop/agency/ai/lib/python3.11/site-packages/llama_index/callbacks/__init__.py", line 7, in <module> from .token_counting import TokenCountingHandler File "/Users/ahmednadiir/Desktop/agency/ai/lib/python3.11/site-packages/llama_index/callbacks/token_counting.py", line 6, in <module> from llama_index.utilities.token_counting import TokenCounter File "/Users/ahmednadiir/Desktop/agency/ai/lib/python3.11/site-packages/llama_index/utilities/token_counting.py", line 6, in <module> from llama_index.llms import ChatMessage, MessageRole File "/Users/ahmednadiir/Desktop/agency/ai/lib/python3.11/site-packages/llama_index/llms/__init__.py", line 14, in <module> from llama_index.llms.anyscale import Anyscale File "/Users/ahmednadiir/Desktop/agency/ai/lib/python3.11/site-packages/llama_index/llms/anyscale.py", line 10, in <module> from llama_index.llms.openai import OpenAI File "/Users/ahmednadiir/Desktop/agency/ai/lib/python3.11/site-packages/llama_index/llms/openai/__init__.py", line 1, in <module> from llama_index.llms.openai.base import AsyncOpenAI, OpenAI, SyncOpenAI, Tokenizer File "/Users/ahmednadiir/Desktop/agency/ai/lib/python3.11/site-packages/llama_index/llms/openai/base.py", line 28, in <module> from llama_index.core.callbacks import CallbackManager File "/Users/ahmednadiir/Desktop/agency/ai/lib/python3.11/site-packages/llama_index/core/callbacks/__init__.py", line 4, in <module> from .token_counting import TokenCountingHandler File "/Users/ahmednadiir/Desktop/agency/ai/lib/python3.11/site-packages/llama_index/core/callbacks/token_counting.py", line 6, in <module> from llama_index.core.utilities.token_counting import TokenCounter File "/Users/ahmednadiir/Desktop/agency/ai/lib/python3.11/site-packages/llama_index/core/utilities/token_counting.py", line 6, in <module> from llama_index.core.llms import ChatMessage, MessageRole ImportError: cannot import name 'ChatMessage' from 'llama_index.core.llms' (/Users/ahmednadiir/Desktop/agency/ai/lib/python3.11/site-packages/llama_index/core/llms/__init__.py)
code:
`from dotenv import load_dotenv
import os
import pandas as pd
from llama_index.core.query_engine import PandasQueryEngine
from prompts import new_prompt, instruction_str
load_dotenv()
#my quran.json file
quran_path = os.path.join('data', 'data.json');
#load
quran_df = pd.read_json(quran_path);
quran_query_engine = PandasQueryEngine(df=quran_df, verbose=True, instruction_str=instruction_str);
quran_query_engine.update_prompts({"pandas_prompt": new_prompt})
quran_query_engine.query("how many total hasanat in the the whole quran")`
help me plz
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.