{"id":22865766,"url":"https://github.com/clemlesne/private-gpt","last_synced_at":"2025-05-05T15:20:21.575Z","repository":{"id":177095587,"uuid":"659291482","full_name":"clemlesne/private-gpt","owner":"clemlesne","description":"Deploy smart and secure conversational agents for your employees, using Azure. Able to use both private and public data.","archived":false,"fork":false,"pushed_at":"2024-02-28T20:56:32.000Z","size":4370,"stargazers_count":60,"open_issues_count":25,"forks_count":12,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-05T15:19:44.164Z","etag":null,"topics":["ai-assisted-chat","azure-openai","business-productivity","chatgpt","cloud-based-chat","conversational-interface","deploy-chatbot","employee-communication","employee-engagement","enterprise-grade-platform","internal-communication","local-chatbot","natural-language-processing","private-gpt","virtual-assistant-for-employees"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clemlesne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null}},"created_at":"2023-06-27T14:16:31.000Z","updated_at":"2025-02-26T18:54:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"d73170be-fc4a-4347-948e-643ff1b96063","html_url":"https://github.com/clemlesne/private-gpt","commit_stats":null,"previous_names":["clemlesne/private-gpt"],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clemlesne%2Fprivate-gpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clemlesne%2Fprivate-gpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clemlesne%2Fprivate-gpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clemlesne%2Fprivate-gpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clemlesne","download_url":"https://codeload.github.com/clemlesne/private-gpt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252522178,"owners_count":21761685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-assisted-chat","azure-openai","business-productivity","chatgpt","cloud-based-chat","conversational-interface","deploy-chatbot","employee-communication","employee-engagement","enterprise-grade-platform","internal-communication","local-chatbot","natural-language-processing","private-gpt","virtual-assistant-for-employees"],"created_at":"2024-12-13T11:38:50.668Z","updated_at":"2025-05-05T15:20:21.556Z","avatar_url":"https://github.com/clemlesne.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Employee communication with Private GPT – AI-powered chatbot you can trust\n\n\u003e 👋🏻 Demo available at [private-gpt.shopping-cart-devops-demo.lesne.pro](https://private-gpt.shopping-cart-devops-demo.lesne.pro).\n\nPrivate GPT is a local version of Chat GPT, using Azure OpenAI. It is an enterprise grade platform to deploy a ChatGPT-like interface for your employees.\n\nIncludes:\n\n- Can be configured to use any Azure OpenAI completion API, including GPT-4\n- Dark theme for better readability\n- Dead simple interface\n- Deployable on any Kubernetes cluster, with its Helm chart\n- Every persistence layers (search, index, AI) is cached, for performance and low cost\n- Manage users effortlessly with OpenID Connect\n- Monitoring with Azure App Insights (logs, traces, user behaviors)\n- More than 150 tones and personalities (accountant, advisor, debater, excel sheet, instructor, logistician, etc.) to better help employees in their specific daily tasks\n- Plug and play storage system, including [Azure Cosmos DB](https://learn.microsoft.com/en-us/azure/cosmos-db/), [Redis](https://github.com/redis/redis) and [Qdrant](https://github.com/qdrant/qdrant).\n- Possibility to send temporary messages, for confidentiality\n- Salable system based on stateless APIs, cache, progressive web app and events\n- Search engine for conversations, based on semantic similarity and AI embeddings\n- Unlimited conversation history and number of users\n- Usage tracking, for better understanding of your employees' usage\n\n![Application screenshot](docs/ui-conversation.png)\n\n## How it works\n\n### High level\n\n```mermaid\nsequenceDiagram\n    autonumber\n\n    actor User\n    participant PWA\n    participant API\n    participant OpenAI\n\n    PWA -\u003e\u003e API: Ask for conversations\n    activate API\n    API -\u003e\u003e API: Get conversations from storage\n    API -\u003e\u003e PWA: Answer with conversations\n    deactivate API\n    User -\u003e\u003e PWA: Select a conversation\n    User -\u003e\u003e PWA: Insert a message\n    PWA -\u003e\u003e API: Send the message\n    activate API\n    API -\u003e\u003e OpenAI: Ask for a completion\n    activate OpenAI\n    OpenAI -\u003e\u003e API: Send completion\n    deactivate OpenAI\n    API -\u003e\u003e API: Save conversation and message\n    API -\u003e\u003e PWA: Answer with the message\n    deactivate API\n    User -\u003e\u003e PWA: See results\n```\n\n### Architecture\n\n```mermaid\ngraph\n    user([\"User\"])\n\n    api[\"Conversation service\\n(REST API)\"]\n    ui[\"Conversation UI\\n(PWA)\"]\n\n    subgraph tools[\"Tools\"]\n    subgraph \"Business data\"\n        form_recognizer[\"Form recognizer\"]\n        cognitive_services[\"Cognitive services\"]\n        storage_blob[\"Blob storage\"]\n        mssql[\"SQL Server\"]\n    end\n\n    subgraph \"Public data\"\n        tmdb[\"TMDB\"]\n        news[\"News\"]\n        listen_notes[\"Listen notes\"]\n        bing[\"Bing\"]\n    end\n    end\n\n    subgraph \"Persistence\"\n    cosmosdb[(\"Cosmos DB\\n(disk)\")]\n    qdrant[(\"Qdrant\\n(disk)\")]\n    redis[(\"Redis\\n(memory)\")]\n    end\n\n    subgraph \"Azure OpenAI services\"\n    oai_ada[\"ADA embedding\"]\n    oai_gpt[\"GPT completions\"]\n    safety[\"Content Safety\"]\n    end\n\n    api -- Cache low-level AI results --\u003e redis\n    api -- Generate completions --\u003e oai_gpt\n    api -- Generate embeddings --\u003e oai_ada\n    api -- Index messages --\u003e qdrant\n    api -- Persist conversations --\u003e cosmosdb\n    api -- Test moderation --\u003e safety\n    api -- Orchestrate external capabilities --\u003e tools\n    ui -- Use APIs --\u003e api\n    user -- Use UI --\u003e ui\n    cognitive_services -- Index data --\u003e mssql\n    cognitive_services -- Index data --\u003e storage_blob\n```\n\n## How to use\n\n### Run locally\n\nCreate a local configuration file, a file named `config.toml` at the root of the project. The TOML file can be placed anywhere in the folder or in any parent directory.\n\n```toml\n# config.toml\n# /!\\ All the file values are for example, you must change them\n[api]\n# root_path = \"[api-path]\"\n\n[oidc]\nalgorithms = [\"RS256\"]\napi_audience = \"[aad_app_id]\"\nissuers = [\"https://login.microsoftonline.com/[tenant_id]/v2.0\"]\njwks = \"https://login.microsoftonline.com/common/discovery/v2.0/keys\"\n\n[monitoring]\n\n[monitoring.logging]\napp_level = \"DEBUG\" # Enum: \"NOSET\", \"DEBUG\", \"INFO\", \"WARN\", \"ERROR\", \"FATAL\", \"CRITICAL\"\nsys_level = \"WARN\" # Enum: \"NOSET\", \"DEBUG\", \"INFO\", \"WARN\", \"ERROR\", \"FATAL\", \"CRITICAL\"\n\n[monitoring.azure_app_insights]\nconnection_str = \"InstrumentationKey=[key];[...]\"\n\n[persistence]\ncache = \"redis\" # Enum: \"redis\"\nsearch = \"qdrant\" # Enum: \"qdrant\"\nstore = \"cosmos\" # Enum: \"cache\", \"cosmos\"\nstream = \"redis\" # Enum: \"redis\"\n\n[persistence.qdrant]\nhost = \"[host]\"\n\n[persistence.redis]\ndb = 0\nhost = \"[host]\"\n\n[persistence.cosmos]\n# Containers \"conversation\" (/user_id), \"message\" (/conversation_id), \"user\" (/dummy), \"usage\" (/user_id) must exist\nurl = \"https://[deployment].documents.azure.com:443\"\ndatabase = \"[db_name]\"\n\n[ai]\n\n[ai.openai]\nada_deploy_id = \"ada\"\nada_max_tokens = 2049\napi_base = \"https://[deployment].openai.azure.com\"\ngpt_deploy_id = \"gpt\"\ngpt_max_tokens = 4096\n\n[ai.azure_content_safety]\napi_base = \"https://[deployment].cognitiveservices.azure.com\"\napi_token = \"[api_token]\"\nmax_length = 1000\n\n[tools]\n\n[tools.azure_form_recognizer]\napi_base = \"https://[deployment].cognitiveservices.azure.com\"\napi_token = \"[api_token]\"\n\n[tools.bing]\nsearch_url = \"https://api.bing.microsoft.com/v7.0/search\"\nsubscription_key = \"[api_token]\"\n\n[tools.tmdb]\nbearer_token = \"[jwt_token]\"\n\n[tools.news]\napi_key = \"[api_token]\"\n\n[tools.listen_notes]\napi_key = \"[api_token]\"\n```\n\nNow, you can either run the application as container or with live reload. For development, it is recommended to use live reload. For demo, it is recommended to use the container.\n\nWith live reload:\n\n```bash\n# In each \"src/[...]\" directory, example \"src/conversation-api\"\nmake install start\n```\n\nAs container:\n\n```bash\nmake build start logs\n```\n\nThen, go to [http://127.0.0.1:8081](http://127.0.0.1:8081).\n\n### Deploy locally\n\nWIP\n\n### Deploy in production\n\nDeployment is container based. Use Helm to install the latest released chart:\n\n```bash\nhelm repo add clemlesne-private-gpt https://clemlesne.github.io/private-gpt\nhelm repo update\nhelm upgrade --install default clemlesne-private-gpt/private-gpt\n```\n\n### Get API docs\n\nGo to [http://127.0.0.1:8081/redoc](http://127.0.0.1:8081/redoc).\n\n![Documentation endpoint](docs/api.png)\n\n## [Security](./SECURITY.md)\n\n## Support\n\nThis project is open source and maintained by people like you. If you need help or found a bug, please feel free to open an issue on the [clemlesne/private-gpt](https://github.com/clemlesne/private-gpt) GitHub project.\n\n## [Code of conduct](./CODE_OF_CONDUCT.md)\n\n## [Authors](./AUTHORS.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclemlesne%2Fprivate-gpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclemlesne%2Fprivate-gpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclemlesne%2Fprivate-gpt/lists"}