Skip to content
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

FEAT: get key for role name populate in UI, Opus, update requirements, #1

Open
wants to merge 10 commits into
base: hand
Choose a base branch
from

Conversation

madtank
Copy link
Owner

@madtank madtank commented Apr 20, 2024

Description

This pull request includes the following changes:

Updated .gitignore

  • Added bedrock/.env to the ignore list.

Created .env_example

  • Added .env_example with a comment and a new environment variable SERPAPI_API_KEY.

Refactored bedrock_chatbot.py

  • Simplified the logic for setting the role_prompt_text based on the selected role.
  • Updated the options in the role selection dropdown to use the keys from the role_prompt dictionary, along with the "Custom" option.

Optimized config.yml

  • Added a new model configuration for "Claude 3 Opus".
  • Adjusted the values for temperature, top_p, and top_k in the existing model configurations.

Enhanced role_prompt.py

  • Removed the "Translator" and "Writer" role prompts.
  • Added new role prompts for "Prompt Generator" and "Code Reviewer".
  • Updated the "Default" role prompt to "You're a helpful assistant".

Updated dependencies in requirements.txt

  • Updated the version numbers for pdfplumber and python-dotenv.

These changes aim to improve the functionality, maintainability, and configuration options of the chatbot application.

madtank and others added 7 commits May 12, 2024 20:21
Add Local FAISS Indexing for Persistent File Handling and Enhance Chatbot Responsiveness
* Integrate Streamlit for Incremental Indexing in bedrock_indexer.py

Transforms `bedrock_indexer.py` into a Streamlit app, enabling file uploads for indexing without reindexing the entire index each time.
- Integrates Streamlit UI components for file uploading, allowing multiple files to be selected and uploaded through the app.
- Implements a check for an existing FAISS index file before adding new documents, enabling incremental indexing of uploaded files.
- Modifies the `index_directory` function to accept uploaded files directly from the Streamlit UI, processing them for indexing.
- Adds a main function to serve as the entry point for the Streamlit app, featuring a title, file uploader, and an indexing button with success or error messages based on the operation outcome.


---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/madtank/Bedrock-ChatBot-with-LangChain-and-Streamlit?shareId=4bdd59be-9cbf-4c37-806f-3ab92f133f92).

* bedrock indexer

* updating doc indexer

* bedrock embedder

* updating RAG

* new RAG feature

* adding new RAG feature
* Replace SerpAPI with DuckDuckGo Search

Related to #8

Replace `SerpAPIWrapper` with `DuckDuckGo` search functionality in `bedrock/bedrock_chatbot.py`.

- Removes the import statement for `SerpAPIWrapper`.
- Adds import statements for `DuckDuckGoSearchRun` and `DuckDuckGoSearchResults` from `langchain_community.tools`.
- Updates the `web_or_local` function to use `DuckDuckGoSearchRun` for web searches, replacing the previous `SerpAPIWrapper` implementation.
- Maintains the rest of the functionality as is, ensuring that the change is focused solely on the search functionality replacement.


---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/madtank/Bedrock-ChatBot-with-LangChain-and-Streamlit/issues/8?shareId=9c5e1d0b-3cde-4878-bdeb-d2fabfeb71e3).

* updating web search to ddg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants