Skip to content

Commit

Permalink
added dockerGPU and runMode to system config
Browse files Browse the repository at this point in the history
  • Loading branch information
jjuliano committed Sep 6, 2024
1 parent 24495ad commit 97a4c79
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
6 changes: 5 additions & 1 deletion deps/pkl/Kdeps.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@ import "package://pkg.pkl-lang.org/pkl-go/[email protected]#/go.pkl"

import "LLM.pkl"

dockerImage: String = "alpine:3.14"
typealias GPU = "nvidia"|"amd"|"cpu"
typealias RunMode = "docker"|"local"

runMode: RunMode = "docker"
dockerGPU: GPU = "cpu"
llmSettings: LLM.LLMSettings
8 changes: 6 additions & 2 deletions deps/pkl/LLM.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ typealias LLMBackend = "ollama"|"openai"|"mistral"|"huggingface"|"groq"

class LLMSettings {
llmAPIKeys: LLMAPIKeys = new {}
llmBackend: LLMBackend = "ollama"
llmModel: String = "llama3.1"
llmFallbackBackend: LLMBackend = "ollama"
llmFallbackModel: String = "llama3.1"
modelFile: ModelFile?
}

Expand Down Expand Up @@ -76,6 +76,8 @@ class ResourceChat {
else
throw("Error: Invalid configuration string: The LLM output string does not match any of the expected formats: ENV:, FILE:. Please ensure that the string starts with one of these prefixes.")

backend: LLMBackend = "ollama"
model: String = "llama3.1"
prompt: String
input: String(isValidLLMIOPrefix)?
output: String(isValidLLMIOPrefix)
Expand All @@ -90,6 +92,8 @@ class ResourceChatSchema {
else
throw("Error: Invalid configuration string: The LLM output string does not match any of the expected formats: ENV:, FILE:. Please ensure that the string starts with one of these prefixes.")

backend: LLMBackend = "ollama"
model: String = "llama3.1"
prompt: String
schema: String
input: String(isValidLLMIOPrefix)?
Expand Down
8 changes: 4 additions & 4 deletions templates/kdeps.pkl
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
amends "package://schema.kdeps.com/core@VERSION_TAG#/Kdeps.pkl"

dockerImage = "alpine:3.14"

runMode = "docker"
dockerGPU = "cpu"
llmSettings {
llmAPIKeys {
openai_api_key = null
mistral_api_key = null
huggingface_api_token = null
groq_api_key = null
}
llmBackend = "ollama"
llmModel = "llama3.1"
llmFallbackBackend = "ollama"
llmFallbackModel = "llama3.1"
modelFile = null
}

0 comments on commit 97a4c79

Please sign in to comment.