stephansturges / gptflix Goto Github PK
View Code? Open in Web Editor NEWSimple Pinecone + OpenAI framework to do RAG on movie reviews (or anything else)
Home Page: https://www.gptflix.ai
Simple Pinecone + OpenAI framework to do RAG on movie reviews (or anything else)
Home Page: https://www.gptflix.ai
got the following error while i created the app. just to be clear, in the secrets file i wrote down the api key for openai and pinecone as specified, but nowhere in the readme did it tell where to put the environment and the index name for pinecone index, please reply on how to fix, am i missing something? where can i put index name and pinecone environment
pinecone.core.exceptions.PineconeProtocolError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you're on Streamlit Cloud, click on 'Manage app' in the lower right of your app).
Traceback:
File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.dict)
File "/app/gptbot/chat/main.py", line 271, in
output = answer_query_with_context_pinecone(user_input)
File "/app/gptbot/chat/main.py", line 222, in answer_query_with_context_pinecone
prompt = construct_prompt_pinecone(query) + "\n\n Q: " + query + "\n A:"
File "/app/gptbot/chat/main.py", line 140, in construct_prompt_pinecone
res = pineconeindex.query([xq], top_k=30, include_metadata=True, namespace="movies")
File "/home/appuser/venv/lib/python3.9/site-packages/pinecone/core/utils/error_handling.py", line 25, in inner_func
raise PineconeProtocolError(f'Failed to connect; did you specify the correct index name?') f
This app is so awesome. The code is super clean and it's really easy to use. I thought I might put some information in here from things I've learned along the way. If this isn't appropriate just let me know (I'm extremely new to all this.)
I wanted to have a little more control over the avatars that appear on the chatbot. So, in here:
https://github.com/stephansturges/GPTflix/blob/main/chat/main.py
I updated the random integer code a bit like this:
# random user picture
# user_av = random.randint(0, 100)
user_av = 3
# random bott picture
# bott_av = random.randint(0, 100)
bott_av = 10
And then at the very bottom of main.py I can change the avatar_style here:
if st.session_state['generated']:
for i in range(len(st.session_state['generated'])-1, -1, -1):
message(st.session_state["generated"][i],seed=bott_av , key=str(i))
message(st.session_state['past'][i], is_user=True,avatar_style="personas",seed=user_av, key=str(i) + '_user')
Honestly, I am still not exactly sure how the avatars work. I think it has something to do with these:
https://www.dicebear.com/styles
If I get to the bottom of it further I'll let you know.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.