diff --git a/LICENSE b/LICENSE index 054282c..ef2ea1f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,8 @@ FreeStream | Free AI tools for everyday people Copyright (C) 2024 Daethyra (Daemon Carino) +FreeStream is licensed under the terms of the GNU Affero General Public License, however the included code of the Real-ESRGAN respository at https://github.com/xinntao/Real-ESRGAN is licensed under the terms of its own BSD 3-Clause license, https://github.com/xinntao/Real-ESRGAN/blob/master/LICENSE. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software diff --git a/README.md b/README.md index 0272841..d7f48f4 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ # FreeStream -Providing AI solutions for everyday people +Try out different AI tools. ***TLDR***: -- Offers AI tooling like a general-purpose chatbot assistant -- Provides free access to generative AI models -- Accepts unlimited file uploads (per user session; deletes data upon exit) -- Leverages state-of-the-art RAG techniques for accurate, helpful responses without requiring complex prompt engineering -- Protects privacy – no AI model training on your data, no sign-up needed +- Free +- General purpose AI chatbots with the ability to read files + - Leverages retrieval techniques to improve response quality +- Your data is deleted upon exit +- No sign-up necessary ## Table of Contents @@ -54,6 +54,7 @@ Make a copy of "template.secrets.toml" and rename it to "secrets.toml" in the ro | OpenAI | https://platform.openai.com/api-keys | | Langchain | https://smith.langchain.com/ | | Google | https://aistudio.google.com/app/apikey | +| Claude | https://console.anthropic.com/ | You can then start the development server with hot reloading by running: @@ -70,13 +71,13 @@ I originally created this project as a chatbot for law and medical professionals | **Vocab** | **Definition** | | ---- | ---------- | -| RAG | Retrieval Augmented Generation | -| C-RAG | Corrective-Retrieval Augmented Generation | -| Self-RAG | Self-reflective Retrieval Augmented Generation | +| [RAG](https://arxiv.org/abs/2005.11401 "Arxiv: 2005.11401") | Retrieval Augmented Generation | +| [C-RAG](https://arxiv.org/abs/2401.15884 "Arxiv: 2401.15884") | Corrective-Retrieval Augmented Generation | +| [Self-RAG](https://arxiv.org/abs/2310.11511 "Arxiv: 2310.11511") | Self-reflective Retrieval Augmented Generation | ### What can FreeStream do for me, currently? -FreeStream functions as a chatbot powered by GPT-3.5-Turbo or Gemini-Pro. Upload a file (or files) and take advantage of advanced prompt engineering for the most helpful results based on your uploaded content. +FreeStream functions as a chatbot powered by GPT-3.5-Turbo or Gemini-Pro. Upload a file (or files) and take advantage of advanced prompt engineering for the most helpful results based on your uploaded content. It additionally has an image upscaler that can upscale to arbitrary ratios. **Note**: * The implemented RAG logic strictly adheres to the uploaded context. This limits meaningful interaction with the chat history. @@ -86,15 +87,8 @@ FreeStream functions as a chatbot powered by GPT-3.5-Turbo or Gemini-Pro. Upload The application **MUST**... 1. Provide a user interface for chatbot interactions and optional file uploads. 2. Allow users to upscale images (PDF, JPEG, PNG, ~~BMP~~, ~~SVG~~) without limits. -3. ~~Enable users to remove objects from uploaded images. This requires:~~ - * ~~Object detection~~ - * ~~Object removal~~ - * ~~Inpainting~~ - * ~~[HuggingFace Resource](https://huggingface.co/docs/diffusers/en/using-diffusers/inpaint)~~ - * ~~[HF Mask Maker (Space)](https://huggingface.co/spaces/daethyra/inpaint-mask-maker)~~ -4. Let users generate tasks based on their speech -5. Include a privacy policy that clearly outlines data usage when interacting with GPT-3.5 or Gemini-Pro -6. ~~Provide a "Submit Report/Request" form~~ +3. Let users generate tasks based on their speech +4. Include a privacy policy that clearly outlines data usage when interacting with GPT-3.5 or Gemini-Pro ## "Non-Functional Requirements @@ -103,8 +97,6 @@ The application **SHOULD**... 2. Use a multipage Streamlit application structure. 3. Prioritize ease of navigation 4. Feature a visually appealing design. -5. Position itself as a toolbox for niche professional workflows. -6. Offer multiple chat models # Roadmap @@ -115,15 +107,13 @@ I'm focusing on overhauling the retrieval prompting logic. I'll remove `Conversa - [x] Create an RAG chatbot - [x] Add Gemini-Pro to the model list -- [ ] ~~Integrate [`StreamlitCallbackHandler`](https://api.python.langchain.com/en/latest/callbacks/langchain_community.callbacks.streamlit.streamlit_callback_handler.StreamlitCallbackHandler.html "Python API Documentation")~~ +- [x] Add Anthropic's Claude 3 model family - [ ] Add AI decision making - [ ] Implement Corrective-RAG OR Reflective-RAG - [x] Turn into a Multi-Page Application (MPA) - [x] (Homepage) Add a welcome screen with... - [x] a description of the project - - [ ] ~~table of contents~~ - [x] privacy policy - - [ ] ~~"Report/Request" form~~ - [x] (Page) Migrate RAG SPA code - [x] Add "Temperature" slider - [ ] (Page) Add a "Task Transcriber" @@ -136,7 +126,6 @@ I'm focusing on overhauling the retrieval prompting logic. I'll remove `Conversa - [x] File type detection - [ ] (Page) Add "Object Removal" from images - [x] Review HuggingFace Spaces's as a potential solution -- [ ] Add "Contributing" section or file --- @@ -146,6 +135,6 @@ I'm focusing on overhauling the retrieval prompting logic. I'll remove `Conversa A conglomerate privacy policy governing FreeStream is planned. For the time being, please refer to the privacy policies of the underlying foundational AI model providers. - [OpenAI Privacy Policy](https://openai.com/policies/privacy-policy) -- [Google AI Studio](https://transparency.google/our-policies/privacy-policy-terms-of-service/) - - I couldn't find a privacy policy specific to Google AI Studio. +- [Google](https://transparency.google/our-policies/privacy-policy-terms-of-service/ "Was unable to find a privacy policy specific to Google AI Studio.") +- [Anthropic](https://support.anthropic.com/en/articles/7996866-how-long-do-you-store-personal-data "Support forum response that may suddenly be obsoleted.") - [Streamlit](https://streamlit.io/privacy-policy/) \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 3d8c225..c7959bf 100644 --- a/poetry.lock +++ b/poetry.lock @@ -147,13 +147,13 @@ files = [ [[package]] name = "anthropic" -version = "0.19.2" +version = "0.20.0" description = "The official Python library for the anthropic API" optional = false python-versions = ">=3.7" files = [ - {file = "anthropic-0.19.2-py3-none-any.whl", hash = "sha256:48f43091e977dac703beb46e46c44c172a443aebddf5fe6dd5776a660abb2907"}, - {file = "anthropic-0.19.2.tar.gz", hash = "sha256:ed3466ba365bdce5c5dbd2ce7915f59c6d6d8fcd69e79e4452cf06582741ca16"}, + {file = "anthropic-0.20.0-py3-none-any.whl", hash = "sha256:754fe24596efbe1d7a49d3d59818a2a25d2bf29539e036eafd8a43427cd58134"}, + {file = "anthropic-0.20.0.tar.gz", hash = "sha256:f9f1a5213af4710d6e1f9b83208a4b158355d1a95eb4ae0906c7580aa0e0f1d1"}, ] [package.dependencies] @@ -2688,13 +2688,13 @@ sympy = "*" [[package]] name = "openai" -version = "1.13.3" +version = "1.13.4" description = "The official Python library for the openai API" optional = false python-versions = ">=3.7.1" files = [ - {file = "openai-1.13.3-py3-none-any.whl", hash = "sha256:5769b62abd02f350a8dd1a3a242d8972c947860654466171d60fb0972ae0a41c"}, - {file = "openai-1.13.3.tar.gz", hash = "sha256:ff6c6b3bc7327e715e4b3592a923a5a1c7519ff5dd764a83d69f633d49e77a7b"}, + {file = "openai-1.13.4-py3-none-any.whl", hash = "sha256:379643b24ded980948794bc8092b01ed7ef35e7915c55ef47fa628e61a96ae1a"}, + {file = "openai-1.13.4.tar.gz", hash = "sha256:bdca99de67db0659b2b27c791f8c1d0018099dc119cd8fc712d64b108ef92ce5"}, ] [package.dependencies] @@ -4416,18 +4416,18 @@ transformers = ">=4.32.0,<5.0.0" [[package]] name = "setuptools" -version = "69.1.1" +version = "69.2.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-69.1.1-py3-none-any.whl", hash = "sha256:02fa291a0471b3a18b2b2481ed902af520c69e8ae0919c13da936542754b4c56"}, - {file = "setuptools-69.1.1.tar.gz", hash = "sha256:5c0806c7d9af348e6dd3777b4f4dbb42c7ad85b190104837488eab9a7c945cf8"}, + {file = "setuptools-69.2.0-py3-none-any.whl", hash = "sha256:c21c49fb1042386df081cb5d86759792ab89efca84cf114889191cd09aacc80c"}, + {file = "setuptools-69.2.0.tar.gz", hash = "sha256:0ff4183f8f42cd8fa3acea16c45205521a4ef28f73c6391d8a25e92893134f2e"}, ] [package.extras] docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.2)", "pip (>=19.1)", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.2)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] [[package]]