-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial Llamaindex commit #11
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its a good practice to not actually include the .env
file in your repo as it can leak credentials. I recommend adding a .env.example
with dummy values for the parameters, and adding a .gitignore that includes .env so it doesn't get tracked by git.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a code quality/code smell nit. 🙂 It is good to keep your code clean so it's easier to maintain. It reduces possibility of bugs, allows others to orient themselves in the codebase much faster etc and in the end leads to fewer errors...
if st.button("Submit"): | ||
if user_input: | ||
# Call FastAPI backend with the user input | ||
url = "http://127.0.0.1:8000/process_input/" | ||
response = requests.post(url, json={"text": user_input}) | ||
|
||
if response.status_code == 200: | ||
result = response.json() | ||
st.write(f"Generated Insurance Score: {result['response']}") | ||
st.write(f"Approval Status: {result['approval_status']}") | ||
else: | ||
st.write("There was an error processing the request.") | ||
else: | ||
st.write("Please enter some information about your driving history.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a nit for code quality. The Zen of Python says: Flat is better than nested.
if st.button("Submit"): | |
if user_input: | |
# Call FastAPI backend with the user input | |
url = "http://127.0.0.1:8000/process_input/" | |
response = requests.post(url, json={"text": user_input}) | |
if response.status_code == 200: | |
result = response.json() | |
st.write(f"Generated Insurance Score: {result['response']}") | |
st.write(f"Approval Status: {result['approval_status']}") | |
else: | |
st.write("There was an error processing the request.") | |
else: | |
st.write("Please enter some information about your driving history.") | |
if not st.button("Submit"): | |
return | |
if not user_input: | |
st.write("Please enter some information about your driving history.") | |
return | |
... | |
if response.status_code != 200: | |
st.write("There was an error processing the request.") | |
return | |
... |
fix: gitignore and .env.example
…on, removed nesting
Deleted .env file and included .gitignore and .env.example, Also changed the streamlit_ui.py script with less nesting. |
This PR introduces the initial implementation of a multi-agent framework using LlamaIndex with the following updates: