This commit is contained in:
mudler
2024-04-16 17:44:04 +02:00
parent 4ed61daf8e
commit 35d9ba44f5
7 changed files with 66 additions and 26 deletions

View File

@@ -21,6 +21,7 @@ var apiURL = os.Getenv("API_URL")
var apiKey = os.Getenv("API_KEY")
var vectorStore = os.Getenv("VECTOR_STORE")
var kbdisableIndexing = os.Getenv("KBDISABLEINDEX")
var timeout = os.Getenv("TIMEOUT")
const defaultChunkSize = 4098
@@ -31,6 +32,9 @@ func init() {
if apiURL == "" {
apiURL = "http://192.168.68.113:8080"
}
if timeout == "" {
timeout = "5m"
}
}
//go:embed views/*
@@ -50,7 +54,7 @@ func main() {
os.MkdirAll(stateDir, 0755)
var dbStore RAGDB
lai := llm.NewClient(apiKey, apiURL+"/v1")
lai := llm.NewClient(apiKey, apiURL+"/v1", timeout)
switch vectorStore {
case "localai":