diff --git a/.github/ISSUE_TEMPLATE/01_bug.yml b/.github/ISSUE_TEMPLATE/01_bug.yml index d59f0e521..3b97773e9 100644 --- a/.github/ISSUE_TEMPLATE/01_bug.yml +++ b/.github/ISSUE_TEMPLATE/01_bug.yml @@ -17,6 +17,7 @@ body: - Docker (remote machine) - Local development - AnythingLLM desktop app + - All versions - Not listed default: 0 validations: diff --git a/README.md b/README.md index 88a4f489a..842efa071 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@

- AnythingLLM: A private ChatGPT to chat with anything!.
- An efficient, customizable, and open-source enterprise-ready document chatbot solution. + AnythingLLM: The all-in-one AI app you were looking for.
+ Chat with your docs, use AI Agents, hyper-configurable, multi-user, & no fustrating set up required.

@@ -25,7 +25,7 @@

-👉 AnythingLLM for desktop is in public beta! Download Now +👉 AnythingLLM for desktop (Mac, Windows, & Linux)! Download Now

A full-stack application that enables you to turn any document, resource, or piece of content into context that any LLM can use as references during chatting. This application allows you to pick and choose which LLM or Vector Database you want to use as well as supporting multi-user management and permissions. @@ -48,7 +48,8 @@ AnythingLLM divides your documents into objects called `workspaces`. A Workspace Some cool features of AnythingLLM - **Multi-user instance support and permissioning** -- **_New_** [Custom Embeddable Chat widget for your website](./embed/README.md) +- Agents inside your workspace (browse the web, run code, etc) +- [Custom Embeddable Chat widget for your website](./embed/README.md) - Multiple document type support (PDF, TXT, DOCX, etc) - Manage documents in your vector database from a simple UI - Two chat modes `conversation` and `query`. Conversation retains previous questions and amendments. Query is simple QA against your documents @@ -82,9 +83,9 @@ Some cool features of AnythingLLM - [AnythingLLM Native Embedder](/server/storage/models/README.md) (default) - [OpenAI](https://openai.com) - [Azure OpenAI](https://azure.microsoft.com/en-us/products/ai-services/openai-service) -- [LM Studio (all)](https://lmstudio.ai) - [LocalAi (all)](https://localai.io/) - [Ollama (all)](https://ollama.ai/) +- [LM Studio (all)](https://lmstudio.ai) **Supported Transcription models:** diff --git a/collector/processSingleFile/convert/asPDF.js b/collector/processSingleFile/convert/asPDF.js index e81fe6c76..458277754 100644 --- a/collector/processSingleFile/convert/asPDF.js +++ b/collector/processSingleFile/convert/asPDF.js @@ -22,7 +22,7 @@ async function asPDF({ fullFilePath = "", filename = "" }) { doc.metadata?.loc?.pageNumber || "unknown" } --` ); - if (!doc.pageContent.length) continue; + if (!doc.pageContent || !doc.pageContent.length) continue; pageContent.push(doc.pageContent); } diff --git a/docker/.env.example b/docker/.env.example index 32f2a55d4..aabc139f8 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -85,10 +85,15 @@ GID='1000' # EMBEDDING_MODEL_MAX_CHUNK_LENGTH=1000 # The max chunk size in chars a string to embed can be # EMBEDDING_ENGINE='ollama' -# EMBEDDING_BASE_PATH='http://127.0.0.1:11434' +# EMBEDDING_BASE_PATH='http://host.docker.internal:11434' # EMBEDDING_MODEL_PREF='nomic-embed-text:latest' # EMBEDDING_MODEL_MAX_CHUNK_LENGTH=8192 +# EMBEDDING_ENGINE='lmstudio' +# EMBEDDING_BASE_PATH='https://host.docker.internal:1234/v1' +# EMBEDDING_MODEL_PREF='nomic-ai/nomic-embed-text-v1.5-GGUF/nomic-embed-text-v1.5.Q4_0.gguf' +# EMBEDDING_MODEL_MAX_CHUNK_LENGTH=8192 + ########################################### ######## Vector Database Selection ######## ########################################### diff --git a/frontend/src/components/EmbeddingSelection/LMStudioOptions/index.jsx b/frontend/src/components/EmbeddingSelection/LMStudioOptions/index.jsx new file mode 100644 index 000000000..1192ce675 --- /dev/null +++ b/frontend/src/components/EmbeddingSelection/LMStudioOptions/index.jsx @@ -0,0 +1,120 @@ +import React, { useEffect, useState } from "react"; +import System from "@/models/system"; + +export default function LMStudioEmbeddingOptions({ settings }) { + const [basePathValue, setBasePathValue] = useState( + settings?.EmbeddingBasePath + ); + const [basePath, setBasePath] = useState(settings?.EmbeddingBasePath); + + return ( +
+
+
+ + setBasePathValue(e.target.value)} + onBlur={() => setBasePath(basePathValue)} + required={true} + autoComplete="off" + spellCheck={false} + /> +
+ +
+ + e.target.blur()} + defaultValue={settings?.EmbeddingModelMaxChunkLength} + required={false} + autoComplete="off" + /> +
+
+
+ ); +} + +function LMStudioModelSelection({ settings, basePath = null }) { + const [customModels, setCustomModels] = useState([]); + const [loading, setLoading] = useState(true); + + useEffect(() => { + async function findCustomModels() { + if (!basePath || !basePath.includes("/v1")) { + setCustomModels([]); + setLoading(false); + return; + } + setLoading(true); + const { models } = await System.customModels("lmstudio", null, basePath); + setCustomModels(models || []); + setLoading(false); + } + findCustomModels(); + }, [basePath]); + + if (loading || customModels.length == 0) { + return ( +
+ + +
+ ); + } + + return ( +
+ + +
+ ); +} diff --git a/frontend/src/components/LLMSelection/GeminiLLMOptions/index.jsx b/frontend/src/components/LLMSelection/GeminiLLMOptions/index.jsx index a46e51329..8cb513f31 100644 --- a/frontend/src/components/LLMSelection/GeminiLLMOptions/index.jsx +++ b/frontend/src/components/LLMSelection/GeminiLLMOptions/index.jsx @@ -29,7 +29,7 @@ export default function GeminiLLMOptions({ settings }) { required={true} className="bg-zinc-900 border-gray-500 text-white text-sm rounded-lg block w-full p-2.5" > - {["gemini-pro"].map((model) => { + {["gemini-pro", "gemini-1.5-pro-latest"].map((model) => { return (