mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-10-04 01:40:12 +02:00
parent
e81dde4b9c
commit
fa2b669940
3
clean.sh
3
clean.sh
@ -1,2 +1,3 @@
|
|||||||
# Easily kill process on port because sometimes nodemon fails to reboot
|
# Easily kill process on port because sometimes nodemon fails to reboot
|
||||||
kill -9 $(lsof -t -i tcp:5000)
|
kill -9 $(lsof -t -i tcp:5000) &
|
||||||
|
kill -9 $(lsof -t -i tcp:3001) # if running default for MacOS Monterey
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React, { useState, useEffect } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import { X } from "react-feather";
|
import { AlertCircle, X } from "react-feather";
|
||||||
import System from "../../models/system";
|
import System from "../../models/system";
|
||||||
|
|
||||||
const noop = () => false;
|
const noop = () => false;
|
||||||
@ -16,8 +16,6 @@ export default function KeysModal({ hideModal = noop }) {
|
|||||||
fetchKeys();
|
fetchKeys();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const allSettingsValid =
|
|
||||||
!!settings && Object.values(settings).every((val) => !!val);
|
|
||||||
return (
|
return (
|
||||||
<div class="fixed top-0 left-0 right-0 z-50 w-full p-4 overflow-x-hidden overflow-y-auto md:inset-0 h-[calc(100%-1rem)] h-full bg-black bg-opacity-50 flex items-center justify-center">
|
<div class="fixed top-0 left-0 right-0 z-50 w-full p-4 overflow-x-hidden overflow-y-auto md:inset-0 h-[calc(100%-1rem)] h-full bg-black bg-opacity-50 flex items-center justify-center">
|
||||||
<div
|
<div
|
||||||
@ -48,20 +46,13 @@ export default function KeysModal({ hideModal = noop }) {
|
|||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="w-full flex flex-col gap-y-4">
|
<div className="w-full flex flex-col gap-y-4">
|
||||||
{allSettingsValid ? (
|
<div className="bg-orange-300 p-4 rounded-lg border border-orange-600 text-orange-700 w-full items-center flex gap-x-2">
|
||||||
<div className="bg-green-300 p-4 rounded-lg border border-green-600 text-green-700 w-full">
|
<AlertCircle className="h-8 w-8" />
|
||||||
<p>All system settings are defined. You are good to go!</p>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<div className="bg-red-300 p-4 rounded-lg border border-red-600 text-red-700 w-full text-sm">
|
|
||||||
<p>
|
<p>
|
||||||
ENV setttings are missing - this software will not
|
Ensure all fields are green before attempting to use
|
||||||
function fully.
|
AnythingLLM or it may not function as expected!
|
||||||
<br />
|
|
||||||
After updating restart the server.
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
<ShowKey
|
<ShowKey
|
||||||
name="OpenAI API Key"
|
name="OpenAI API Key"
|
||||||
value={settings?.OpenAiKey ? "*".repeat(20) : ""}
|
value={settings?.OpenAiKey ? "*".repeat(20) : ""}
|
||||||
|
@ -88,7 +88,9 @@ export function usePasswordModal() {
|
|||||||
if (import.meta.env.DEV) {
|
if (import.meta.env.DEV) {
|
||||||
setRequiresAuth(false);
|
setRequiresAuth(false);
|
||||||
} else {
|
} else {
|
||||||
const currentToken = window.localStorage.getItem("anythingllm_authtoken");
|
const currentToken = window.localStorage.getItem(
|
||||||
|
"anythingllm_authtoken"
|
||||||
|
);
|
||||||
const settings = await System.keys();
|
const settings = await System.keys();
|
||||||
const requiresAuth = settings?.RequiresAuth || false;
|
const requiresAuth = settings?.RequiresAuth || false;
|
||||||
|
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
export const API_BASE =
|
export const API_BASE =
|
||||||
import.meta.env.VITE_API_BASE || "http://localhost:5000";
|
import.meta.env.VITE_API_BASE || "http://localhost:3001";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
SERVER_PORT=5000
|
SERVER_PORT=3001
|
||||||
OPEN_AI_KEY=
|
OPEN_AI_KEY=
|
||||||
OPEN_MODEL_PREF='gpt-3.5-turbo'
|
OPEN_MODEL_PREF='gpt-3.5-turbo'
|
||||||
CACHE_VECTORS="true"
|
CACHE_VECTORS="true"
|
||||||
|
@ -48,9 +48,7 @@ function systemEndpoints(app) {
|
|||||||
try {
|
try {
|
||||||
const { password } = reqBody(request);
|
const { password } = reqBody(request);
|
||||||
if (password !== process.env.AUTH_TOKEN) {
|
if (password !== process.env.AUTH_TOKEN) {
|
||||||
response
|
response.status(402).json({
|
||||||
.status(402)
|
|
||||||
.json({
|
|
||||||
valid: false,
|
valid: false,
|
||||||
token: null,
|
token: null,
|
||||||
message: "Invalid password provided",
|
message: "Invalid password provided",
|
||||||
|
@ -5,9 +5,11 @@
|
|||||||
### How to get started
|
### How to get started
|
||||||
|
|
||||||
**Requirements**
|
**Requirements**
|
||||||
|
|
||||||
- Pinecone account (free or paid)
|
- Pinecone account (free or paid)
|
||||||
|
|
||||||
**Instructions**
|
**Instructions**
|
||||||
|
|
||||||
- Create an index on your Pinecone account. Name can be anything eg: `my-primary-index`
|
- Create an index on your Pinecone account. Name can be anything eg: `my-primary-index`
|
||||||
- Metric `cosine`
|
- Metric `cosine`
|
||||||
- Dimensions `1536` since we use OpenAI for embeddings
|
- Dimensions `1536` since we use OpenAI for embeddings
|
||||||
|
Loading…
Reference in New Issue
Block a user