From 492806ef746380e6588be900ed72298da11d3acb Mon Sep 17 00:00:00 2001 From: Ashpreet Bedi Date: Tue, 16 Apr 2024 18:39:03 +0100 Subject: [PATCH 1/6] README --- README.md | 436 ++++-------------- .../singlestore/auto_rag/README.md | 18 +- 2 files changed, 99 insertions(+), 355 deletions(-) diff --git a/README.md b/README.md index 2ef8491f7..7e68f5a52 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ phidata

- Function calling is all you need + Add memory, knowledge and tools to LLMs

@@ -21,13 +21,15 @@ ## What is phidata? -Phidata is a toolkit for building AI Assistants with function calling and connecting LLMs to external tools. +Phidata adds memory, knowledge and tools to LLMs. -Use phidata to let LLMs do **web search, data analysis, send emails or access your application specific logic.** +**Problem:** LLMs have limited context and cannot take actions.
+**Solution:** Add memory, knowledge and tools. +- **Memory:** Enables LLMs to have long-term conversations by storing **chat history** in a database. +- **Knowledge:** Provides LLMs with **business context** by storing information in a vector database. +- **Tools:** Enable LLMs to **take actions** like pulling data from an API, sending emails or querying a database. -Phidata Assistants come with built-in memory, storage, knowledge and access to tools. Go beyond text generation and build AI applications that can take actions - -![assistants](https://github.com/phidatahq/phidata/assets/22579644/facb618c-17bd-4ab8-99eb-c4c8309e0f45) +Memory & knowledge make LLMs **smarter** while tools make them **autonomous**. ## How it works @@ -35,13 +37,15 @@ Phidata Assistants come with built-in memory, storage, knowledge and access to t - **Step 2:** Add Tools (functions), Knowledge (vectordb) and Storage (database) - **Step 3:** Serve using Streamlit, FastApi or Django to build your AI application -## Installation +## Quickstart + +### Install phidata ```shell pip install -U phidata ``` -## Example 1: Assistant that can search the web +### Create an Assistant that can search the web Create a file `assistant.py` @@ -71,9 +75,25 @@ Run the `Assistant` and let it search the web using `DuckDuckGo` python assistant.py ``` -## Example 2: Assistant that can write and run python code +## Demos + +Checkout the following AI Applications built using phidata: + +-
PDF AI that summarizes and answers questions from PDFs. +- ArXiv AI that answers questions about ArXiv papers using the ArXiv API. +- HackerNews AI summarize stories, users and shares what's new on HackerNews. + +## Examples + +### Assistant that can write and run python code + +

+ +Show details -The `PythonAssistant` can achieve tasks using python code. Create a file `python_assistant.py` +The `PythonAssistant` can achieve tasks by writing and running python code. + +- Create a file `python_assistant.py` ```python from phi.assistant.python import PythonAssistant @@ -93,7 +113,7 @@ python_assistant = PythonAssistant( python_assistant.print_response("What is the average rating of movies?", markdown=True) ``` -Install pandas and run the `python_assistant.py` +- Install pandas and run the `python_assistant.py` ```shell pip install pandas @@ -101,9 +121,17 @@ pip install pandas python python_assistant.py ``` -## Example 3: Assistant that can analyze data using SQL +
+ +### Assistant that can analyze data using SQL + +
+ +Show details -The `DuckDbAssistant` can perform data analysis using SQL. Create a file `data_assistant.py` +The `DuckDbAssistant` can perform data analysis using SQL. + +- Create a file `data_assistant.py` ```python import json @@ -124,7 +152,7 @@ duckdb_assistant = DuckDbAssistant( duckdb_assistant.print_response("What is the average rating of movies? Show me the SQL.", markdown=True) ``` -Install duckdb and run the `data_assistant.py` file +- Install duckdb and run the `data_assistant.py` file ```shell pip install duckdb @@ -132,131 +160,19 @@ pip install duckdb python data_assistant.py ``` -## Demos - -Checkout these AI apps showcasing the advantage of function calling: - -- PDF AI that summarizes and answers questions from PDFs. -- ArXiv AI that answers questions about ArXiv papers using the ArXiv API. -- HackerNews AI that interacts with the HN API to summarize stories, users, find out what's trending, summarize topics. -- Demo Streamlit App serving a PDF, Image and Website Assistant (password: admin) -- Demo FastApi serving a PDF Assistant. - -## Tutorials - -### Build an AI App in 3 steps - -[![Build an AI App](https://img.youtube.com/vi/VNoBVR5t1yI/0.jpg)](https://www.youtube.com/watch?v=VNoBVR5t1yI&t "Build an AI App") - -### Build a Local RAG AI App using OpenHermes and Ollama -[![Local AI App](https://img.youtube.com/vi/EVQLYncsDVI/0.jpg)](https://www.youtube.com/watch?v=EVQLYncsDVI&t "Local AI App") - -## More Examples - -### Assistant that calls the HackerNews API - -
- -Show details - -- Create a file `api_assistant.py` that can call the HackerNews API to get top stories. - -```python -import json -import httpx - -from phi.assistant import Assistant - - -def get_top_hackernews_stories(num_stories: int = 10) -> str: - """Use this function to get top stories from Hacker News. - - Args: - num_stories (int): Number of stories to return. Defaults to 10. - - Returns: - str: JSON string of top stories. - """ - - # Fetch top story IDs - response = httpx.get('https://hacker-news.firebaseio.com/v0/topstories.json') - story_ids = response.json() - - # Fetch story details - stories = [] - for story_id in story_ids[:num_stories]: - story_response = httpx.get(f'https://hacker-news.firebaseio.com/v0/item/{story_id}.json') - story = story_response.json() - if "text" in story: - story.pop("text", None) - stories.append(story) - return json.dumps(stories) - -assistant = Assistant(tools=[get_top_hackernews_stories], show_tool_calls=True) -assistant.print_response("Summarize the top stories on hackernews?", markdown=True) -``` - -- Run the `api_assistant.py` file - -```shell -python api_assistant.py -``` - -- See it work through the problem - -```shell -╭──────────┬───────────────────────────────────────────────────────────────────╮ -│ Message │ Summarize the top stories on hackernews? │ -├──────────┼───────────────────────────────────────────────────────────────────┤ -│ Response │ │ -│ (51.1s) │ • Running: get_top_hackernews_stories(num_stories=5) │ -│ │ │ -│ │ Here's a summary of the top stories on Hacker News: │ -│ │ │ -│ │ 1 Boeing Whistleblower: Max 9 Production Line Has "Enormous │ -│ │ Volume of Defects" A whistleblower has revealed that Boeing's │ -│ │ Max 9 production line is riddled with an "enormous volume of │ -│ │ defects," with instances where bolts were not installed. The │ -│ │ story has garnered attention with a score of 140. Read more │ -│ │ 2 Arno A. Penzias, 90, Dies; Nobel Physicist Confirmed Big Bang │ -│ │ Theory Arno A. Penzias, a Nobel Prize-winning physicist known │ -│ │ for his work that confirmed the Big Bang Theory, has passed │ -│ │ away at the age of 90. His contributions to science have been │ -│ │ significant, leading to discussions and tributes in the │ -│ │ scientific community. The news has a score of 207. Read more │ -│ │ 3 Why the fuck are we templating YAML? (2019) This provocative │ -│ │ article from 2019 questions the proliferation of YAML │ -│ │ templating in software, sparking a larger conversation about │ -│ │ the complexities and potential pitfalls of this practice. With │ -│ │ a substantial score of 149, it remains a hot topic of debate. │ -│ │ Read more │ -│ │ 4 Forging signed commits on GitHub Researchers have discovered a │ -│ │ method for forging signed commits on GitHub which is causing │ -│ │ concern within the tech community about the implications for │ -│ │ code security and integrity. The story has a current score of │ -│ │ 94. Read more │ -│ │ 5 Qdrant, the Vector Search Database, raised $28M in a Series A │ -│ │ round Qdrant, a company specializing in vector search │ -│ │ databases, has successfully raised $28 million in a Series A │ -│ │ funding round. This financial milestone indicates growing │ -│ │ interest and confidence in their technology. The story has │ -│ │ attracted attention with a score of 55. Read more │ -╰──────────┴───────────────────────────────────────────────────────────────────╯ -``` -
-### Assistant that generates pydantic models +### Assistant that can generate pydantic models
Show details -One of our favorite features is generating structured data (i.e. a pydantic model) from sparse information. -Meaning we can use Assistants to return pydantic models and generate content which previously could not be possible. -In this example, our movie assistant generates an object of the `MovieScript` class. +One of our favorite LLM features is generating structured data (i.e. a pydantic model) from text. Use this feature to extract features, generate movie scripts, produce fake data etc. -- Create a file `pydantic_assistant.py` +Let's create an Movie Assistant to write a `MovieScript` for us. + +- Create a file `movie_assistant.py` ```python from typing import List @@ -264,7 +180,6 @@ from pydantic import BaseModel, Field from rich.pretty import pprint from phi.assistant import Assistant - class MovieScript(BaseModel): setting: str = Field(..., description="Provide a nice setting for a blockbuster movie.") ending: str = Field(..., description="Ending of the movie. If not available, provide a happy ending.") @@ -273,22 +188,21 @@ class MovieScript(BaseModel): characters: List[str] = Field(..., description="Name of characters for this movie.") storyline: str = Field(..., description="3 sentence storyline for the movie. Make it exciting!") - movie_assistant = Assistant( - description="You help people write movie ideas.", + description="You help write movie scripts.", output_model=MovieScript, ) pprint(movie_assistant.run("New York")) ``` -- Run the `pydantic_assistant.py` file +- Run the `movie_assistant.py` file ```shell -python pydantic_assistant.py +python movie_assistant.py ``` -- See how the assistant generates a structured output +- The output is an object of the `MovieScript` class, here's how it looks: ```shell MovieScript( @@ -317,28 +231,18 @@ Lets create a PDF Assistant that can answer questions from a PDF. We'll use `PgV 1. Run PgVector -- Install [docker desktop](https://docs.docker.com/desktop/install/mac-install/) for running PgVector in a container. -- Create a file `resources.py` with the following contents +Install [docker desktop](https://docs.docker.com/desktop/install/mac-install/) and run **PgVector** on port **5532** using: -```python -from phi.docker.app.postgres import PgVectorDb -from phi.docker.resources import DockerResources - -# -*- PgVector running on port 5432:5432 -vector_db = PgVectorDb( - pg_user="ai", - pg_password="ai", - pg_database="ai", -) - -# -*- DockerResources -dev_docker_resources = DockerResources(apps=[vector_db]) -``` - -- Start `PgVector` using - -```shell -phi start resources.py -y +```bash +docker run -d \ + -e POSTGRES_DB=ai \ + -e POSTGRES_USER=ai \ + -e POSTGRES_PASSWORD=ai \ + -e PGDATA=/var/lib/postgresql/data/pgdata \ + -v pgvolume:/var/lib/postgresql/data \ + -p 5532:5432 \ + --name pgvector \ + phidata/pgvector:16 ``` 2. Create PDF Assistant @@ -354,22 +258,16 @@ from phi.storage.assistant.postgres import PgAssistantStorage from phi.knowledge.pdf import PDFUrlKnowledgeBase from phi.vectordb.pgvector import PgVector2 -from resources import vector_db +db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" knowledge_base = PDFUrlKnowledgeBase( urls=["https://phi-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf"], - vector_db=PgVector2( - collection="recipes", - db_url=vector_db.get_db_connection_local(), - ), + vector_db=PgVector2(collection="recipes", db_url=db_url), ) # Comment out after first run -knowledge_base.load(recreate=False) +knowledge_base.load() -storage = PgAssistantStorage( - table_name="pdf_assistant", - db_url=vector_db.get_db_connection_local(), -) +storage = PgAssistantStorage(table_name="pdf_assistant", db_url=db_url) def pdf_assistant(new: bool = False, user: str = "user"): @@ -385,12 +283,12 @@ def pdf_assistant(new: bool = False, user: str = "user"): user_id=user, knowledge_base=knowledge_base, storage=storage, - # use_tools=True adds functions to - # search the knowledge base and chat history - use_tools=True, + # Show tool calls in the response show_tool_calls=True, - # Uncomment the following line to use traditional RAG - # add_references_to_prompt=True, + # Enable the assistant to search the knowledge base + search_knowledge=True, + # Enable the assistant to read the chat history + read_chat_history=True, ) if run_id is None: run_id = assistant.run_id @@ -398,11 +296,9 @@ def pdf_assistant(new: bool = False, user: str = "user"): else: print(f"Continuing Run: {run_id}\n") - while True: - message = Prompt.ask(f"[bold] :sunglasses: {user} [/bold]") - if message in ("exit", "bye"): - break - assistant.print_response(message, markdown=True) + # Runs the assistant as a cli app + assistant.cli_app(markdown=True) + if __name__ == "__main__": typer.run(pdf_assistant) @@ -411,7 +307,7 @@ if __name__ == "__main__": 3. Install libraries ```shell -pip install -U pgvector pypdf psycopg sqlalchemy +pip install -U pgvector pypdf "psycopg[binary]" sqlalchemy ``` 4. Run PDF Assistant @@ -428,34 +324,6 @@ How do I make pad thai? - See how the Assistant searches the knowledge base and returns a response. -
- -Show output - -```shell -Started Run: d28478ea-75ed-4710-8191-22564ebfb140 - -INFO Loading knowledge base -INFO Reading: - https://www.family-action.org.uk/content/uploads/2019/07/meals-more-recipes.pdf -INFO Loaded 82 documents to knowledge base - 😎 user : How do I make chicken tikka salad? -╭──────────┬─────────────────────────────────────────────────────────────────────────────────╮ -│ Message │ How do I make chicken tikka salad? │ -├──────────┼─────────────────────────────────────────────────────────────────────────────────┤ -│ Response │ │ -│ (7.2s) │ • Running: search_knowledge_base(query=chicken tikka salad) │ -│ │ │ -│ │ I found a recipe for Chicken Tikka Salad that serves 2. Here are the │ -│ │ ingredients and steps: │ -│ │ │ -│ │ Ingredients: │ - -... -``` - -
- - Message `bye` to exit, start the assistant again using `python pdf_assistant.py` and ask: ``` @@ -470,130 +338,6 @@ See how the assistant now maintains storage across sessions. python pdf_assistant.py --new ``` -5. Stop PgVector - -Play around and then stop `PgVector` using `phi stop resources.py` - -```shell -phi stop resources.py -y -``` - -
- -### Build an AI App using Streamlit, FastApi and PgVector - -
- -Show details - -Let's build an **AI App** using GPT-4 as the LLM, Streamlit as the chat interface, FastApi as the API and PgVector for knowledge and storage. Read the full tutorial here. - -### Create your codebase - -Create your codebase using the `ai-app` template - -```shell -phi ws create -t ai-app -n ai-app -``` - -This will create a folder `ai-app` with a pre-built AI App that you can customize and make your own. - -### Serve your App using Streamlit - -Streamlit allows us to build micro front-ends and is extremely useful for building basic applications in pure python. Start the `app` group using: - -```shell -phi ws up --group app -``` - -**Press Enter** to confirm and give a few minutes for the image to download. - -#### PDF Assistant - -- Open localhost:8501 to view streamlit apps that you can customize and make your own. -- Click on **PDF Assistant** in the sidebar -- Enter a username and wait for the knowledge base to load. -- Choose either the `RAG` or `Autonomous` Assistant type. -- Ask "How do I make pad thai?" -- Upload PDFs and ask questions - -> We provide a default PDF of ThaiRecipes that you can clear using the `Clear Knowledge Base` button. The PDF is only for testing. - -chat-with-pdf - -### Optional: Serve your App using FastApi - -Streamlit is great for building micro front-ends but any production application will be built using a front-end framework like `next.js` backed by a RestApi built using a framework like `FastApi`. - -Your AI App comes ready-to-use with FastApi endpoints. - -- Update the `workspace/settings.py` file and set `dev_api_enabled=True` - -```python -... -ws_settings = WorkspaceSettings( - ... - # Uncomment the following line - dev_api_enabled=True, -... -``` - -- Start the `api` group using: - -```shell -phi ws up --group api -``` - -**Press Enter** to confirm and give a few minutes for the image to download. - -- View API Endpoints - -- Open localhost:8000/docs to view the API Endpoints. -- Load the knowledge base using `/v1/assitants/load-knowledge-base` -- Test the `v1/assitants/chat` endpoint with `{"message": "How do I make chicken curry?"}` -- The Api comes pre-built with endpoints that you can integrate with your front-end. - -### Optional: Run Jupyterlab - -A jupyter notebook is a must-have for AI development and your `ai-app` comes with a notebook pre-installed with the required dependencies. Enable it by updating the `workspace/settings.py` file: - -```python -... -ws_settings = WorkspaceSettings( - ... - # Uncomment the following line - dev_jupyter_enabled=True, -... -``` - -Start `jupyter` using: - - -```shell -phi ws up --group jupyter -``` - -**Press Enter** to confirm and give a few minutes for the image to download (only the first time). Verify container status and view logs on the docker dashboard. - -#### View Jupyterlab UI - -- Open localhost:8888 to view the Jupyterlab UI. Password: **admin** -- Play around with cookbooks in the `notebooks` folder. - -- Delete local resources - -### Stop the workspace - -Play around and stop the workspace using: - -```shell -phi ws down -``` - -### Run your AI App on AWS - -Read how to run your AI App on AWS. -
### [Checkout the cookbook for more examples](https://github.com/phidatahq/phidata/tree/main/cookbook) @@ -604,24 +348,30 @@ Read how to discord - Or email us at help@phidata.com -## AI Applications +## Next Steps + +1. Read the basics to learn more about phidata. +2. Read about Assistants and how to customize them. +3. Checkout the cookbook for in-depth examples and code. -After building an Assistant, serve it using **Streamlit**, **FastApi** or **Django** to build your AI application. -Instead of wiring tools manually, phidata provides **pre-built** templates for AI Apps that you can run locally or deploy to AWS with 1 command. Here's how they work: +## Tutorials + +### Build an AI App in 3 steps -- Create your AI App using a template: `phi ws create` -- Run your app locally: `phi ws up` -- Run your app on AWS: `phi ws up prd:aws` +[![Build an AI App](https://img.youtube.com/vi/VNoBVR5t1yI/0.jpg)](https://www.youtube.com/watch?v=VNoBVR5t1yI&t "Build an AI App") + +### Build a Local RAG AI App using OpenHermes and Ollama +[![Local AI App](https://img.youtube.com/vi/EVQLYncsDVI/0.jpg)](https://www.youtube.com/watch?v=EVQLYncsDVI&t "Local AI App") -## Building AI for your product? +## Looking to build an AI product? -We've helped many companies build AI for their products, the general workflow is: +We've helped many companies build AI products, the general workflow is: -1. **Train an assistant** with proprietary data to perform tasks specific to your product. -2. **Connect your product** to the assistant via an API. -3. **Customize, Monitor and Improve** the AI. +1. **Build an Assistant** with proprietary data to perform tasks specific to your product. +2. **Connect your product** to the Assistant via an API. +3. **Monitor and Improve** your AI product. -We provide dedicated support and development for AI products. [Book a call](https://cal.com/phidata/intro) to get started. +We also provide dedicated support and development, [book a call](https://cal.com/phidata/intro) to get started. ## Contributions diff --git a/cookbook/integrations/singlestore/auto_rag/README.md b/cookbook/integrations/singlestore/auto_rag/README.md index 3ee84289e..2e4c7521b 100644 --- a/cookbook/integrations/singlestore/auto_rag/README.md +++ b/cookbook/integrations/singlestore/auto_rag/README.md @@ -69,23 +69,17 @@ streamlit run cookbook/integrations/singlestore/auto_rag/app.py Examples: -URL: +URL: https://www.singlestore.com/blog/choosing-a-vector-database-for-your-gen-ai-stack/ -- https://www.singlestore.com/blog/choosing-a-vector-database-for-your-gen-ai-stack/ - Question: -- Help me choose a vector database +Question: Help me choose a vector database -URL: +URL: https://www.singlestore.com/blog/hybrid-search-vector-full-text-search/ -- https://www.singlestore.com/blog/hybrid-search-vector-full-text-search/ - Question: -- Tell me about hybrid search in SingleStore? +Question: Tell me about hybrid search in SingleStore? -URL: +URL: https://www.singlestore.com/blog/singlestore-vector-data-type-support/ -- https://www.singlestore.com/blog/singlestore-vector-data-type-support/ - Questions: -- Tell me about vector type in SingleStore? +Question: Tell me about vector type in SingleStore? ### 6. Message us on [discord](https://discord.gg/4MtYHHrgA8) if you have any questions From 801829d1641ec4f98565575fcb789ce4adb9bb5d Mon Sep 17 00:00:00 2001 From: Ashpreet Bedi Date: Tue, 16 Apr 2024 18:43:50 +0100 Subject: [PATCH 2/6] README --- README.md | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 7e68f5a52..2498db159 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,9 @@ ## What is phidata? -Phidata adds memory, knowledge and tools to LLMs. +Phidata is a framework for building AI Assistants with memory, knowledge and tools. + +## Why use phidata **Problem:** LLMs have limited context and cannot take actions.
**Solution:** Add memory, knowledge and tools. @@ -37,15 +39,13 @@ Memory & knowledge make LLMs **smarter** while tools make them **autonomous**. - **Step 2:** Add Tools (functions), Knowledge (vectordb) and Storage (database) - **Step 3:** Serve using Streamlit, FastApi or Django to build your AI application -## Quickstart - -### Install phidata +## Installation ```shell pip install -U phidata ``` -### Create an Assistant that can search the web +## Example: Create an Assistant that can search the web Create a file `assistant.py` @@ -75,6 +75,17 @@ Run the `Assistant` and let it search the web using `DuckDuckGo` python assistant.py ``` +## Documentation + +- You can find the full documentation here +- You can also chat with us on discord + +## Next Steps + +1. Read the basics to learn more about phidata. +2. Read about Assistants and how to customize them. +3. Checkout the cookbook for in-depth examples and code. + ## Demos Checkout the following AI Applications built using phidata: @@ -85,7 +96,7 @@ Checkout the following AI Applications built using phidata: ## Examples -### Assistant that can write and run python code +### 1. Assistant that can write and run python code
@@ -123,7 +134,7 @@ python python_assistant.py
-### Assistant that can analyze data using SQL +### 2. Assistant that can analyze data using SQL
@@ -162,7 +173,7 @@ python data_assistant.py
-### Assistant that can generate pydantic models +### 3. Assistant that can generate pydantic models
@@ -217,7 +228,7 @@ MovieScript(
-### A PDF Assistant with Knowledge & Storage +### 4. PDF Assistant with Knowledge & Storage
@@ -340,19 +351,7 @@ python pdf_assistant.py --new
-### [Checkout the cookbook for more examples](https://github.com/phidatahq/phidata/tree/main/cookbook) - -## Documentation - -- You can find the full documentation here -- You can also chat with us on discord -- Or email us at help@phidata.com - -## Next Steps - -1. Read the basics to learn more about phidata. -2. Read about Assistants and how to customize them. -3. Checkout the cookbook for in-depth examples and code. +### 5. Checkout the [cookbook](https://github.com/phidatahq/phidata/tree/main/cookbook) for more examples. ## Tutorials From 584be773388289972a14f4158574f06dc2d0fd29 Mon Sep 17 00:00:00 2001 From: Ashpreet Bedi Date: Tue, 16 Apr 2024 18:44:31 +0100 Subject: [PATCH 3/6] README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2498db159..c07c3e67b 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ ## What is phidata? -Phidata is a framework for building AI Assistants with memory, knowledge and tools. +Phidata is a framework for adding memory, knowledge and tools to LLMs. ## Why use phidata From 3dc44dff64ace859df320e45af211096b90dfe14 Mon Sep 17 00:00:00 2001 From: Ashpreet Date: Tue, 16 Apr 2024 18:47:05 +0100 Subject: [PATCH 4/6] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index c07c3e67b..96569da26 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,9 @@ Memory & knowledge make LLMs **smarter** while tools make them **autonomous**. - **Step 2:** Add Tools (functions), Knowledge (vectordb) and Storage (database) - **Step 3:** Serve using Streamlit, FastApi or Django to build your AI application +![image](https://github.com/phidatahq/phidata/assets/22579644/295187f6-ac9d-41e0-abdb-38e3291ad1d1) + + ## Installation ```shell From 4b0b964983f5a4e47b2caf39ac4f0870045b5dfb Mon Sep 17 00:00:00 2001 From: Ashpreet Bedi Date: Tue, 16 Apr 2024 18:48:18 +0100 Subject: [PATCH 5/6] README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 96569da26..1b9eb1840 100644 --- a/README.md +++ b/README.md @@ -33,14 +33,14 @@ Phidata is a framework for adding memory, knowledge and tools to LLMs. Memory & knowledge make LLMs **smarter** while tools make them **autonomous**. +![image](https://github.com/phidatahq/phidata/assets/22579644/295187f6-ac9d-41e0-abdb-38e3291ad1d1) + ## How it works - **Step 1:** Create an `Assistant` - **Step 2:** Add Tools (functions), Knowledge (vectordb) and Storage (database) - **Step 3:** Serve using Streamlit, FastApi or Django to build your AI application -![image](https://github.com/phidatahq/phidata/assets/22579644/295187f6-ac9d-41e0-abdb-38e3291ad1d1) - ## Installation From 613fa29917beac123aeddc9143b069b9241c4457 Mon Sep 17 00:00:00 2001 From: Ashpreet Bedi Date: Tue, 16 Apr 2024 18:50:10 +0100 Subject: [PATCH 6/6] README --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1b9eb1840..58efc2e0d 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ Checkout the following AI Applications built using phidata: ## Examples -### 1. Assistant that can write and run python code +### Assistant that can write and run python code
@@ -137,7 +137,7 @@ python python_assistant.py
-### 2. Assistant that can analyze data using SQL +### Assistant that can analyze data using SQL
@@ -176,7 +176,7 @@ python data_assistant.py
-### 3. Assistant that can generate pydantic models +### Assistant that can generate pydantic models
@@ -231,7 +231,7 @@ MovieScript(
-### 4. PDF Assistant with Knowledge & Storage +### PDF Assistant with Knowledge & Storage
@@ -354,7 +354,7 @@ python pdf_assistant.py --new
-### 5. Checkout the [cookbook](https://github.com/phidatahq/phidata/tree/main/cookbook) for more examples. +### Checkout the [cookbook](https://github.com/phidatahq/phidata/tree/main/cookbook) for more examples. ## Tutorials