diff --git a/gen/kdeps/Kdeps.pkl.go b/gen/kdeps/Kdeps.pkl.go index 73d9274..838afcb 100644 --- a/gen/kdeps/Kdeps.pkl.go +++ b/gen/kdeps/Kdeps.pkl.go @@ -5,11 +5,15 @@ import ( "context" "github.com/apple/pkl-go/pkl" + "github.com/kdeps/schema/gen/kdeps/gpu" + "github.com/kdeps/schema/gen/kdeps/runmode" "github.com/kdeps/schema/gen/llm" ) type Kdeps struct { - DockerImage string `pkl:"dockerImage"` + RunMode runmode.RunMode `pkl:"runMode"` + + DockerGPU gpu.GPU `pkl:"dockerGPU"` LlmSettings *llm.LLMSettings `pkl:"llmSettings"` } diff --git a/gen/kdeps/gpu/GPU.pkl.go b/gen/kdeps/gpu/GPU.pkl.go new file mode 100644 index 0000000..825df02 --- /dev/null +++ b/gen/kdeps/gpu/GPU.pkl.go @@ -0,0 +1,37 @@ +// Code generated from Pkl module `org.kdeps.pkl.Kdeps`. DO NOT EDIT. +package gpu + +import ( + "encoding" + "fmt" +) + +type GPU string + +const ( + Nvidia GPU = "nvidia" + Amd GPU = "amd" + Cpu GPU = "cpu" +) + +// String returns the string representation of GPU +func (rcv GPU) String() string { + return string(rcv) +} + +var _ encoding.BinaryUnmarshaler = new(GPU) + +// UnmarshalBinary implements encoding.BinaryUnmarshaler for GPU. +func (rcv *GPU) UnmarshalBinary(data []byte) error { + switch str := string(data); str { + case "nvidia": + *rcv = Nvidia + case "amd": + *rcv = Amd + case "cpu": + *rcv = Cpu + default: + return fmt.Errorf(`illegal: "%s" is not a valid GPU`, str) + } + return nil +} diff --git a/gen/kdeps/runmode/RunMode.pkl.go b/gen/kdeps/runmode/RunMode.pkl.go new file mode 100644 index 0000000..a0d9e3b --- /dev/null +++ b/gen/kdeps/runmode/RunMode.pkl.go @@ -0,0 +1,34 @@ +// Code generated from Pkl module `org.kdeps.pkl.Kdeps`. DO NOT EDIT. +package runmode + +import ( + "encoding" + "fmt" +) + +type RunMode string + +const ( + Docker RunMode = "docker" + Local RunMode = "local" +) + +// String returns the string representation of RunMode +func (rcv RunMode) String() string { + return string(rcv) +} + +var _ encoding.BinaryUnmarshaler = new(RunMode) + +// UnmarshalBinary implements encoding.BinaryUnmarshaler for RunMode. +func (rcv *RunMode) UnmarshalBinary(data []byte) error { + switch str := string(data); str { + case "docker": + *rcv = Docker + case "local": + *rcv = Local + default: + return fmt.Errorf(`illegal: "%s" is not a valid RunMode`, str) + } + return nil +} diff --git a/gen/llm/LLMSettings.pkl.go b/gen/llm/LLMSettings.pkl.go index 413f38e..ebd8759 100644 --- a/gen/llm/LLMSettings.pkl.go +++ b/gen/llm/LLMSettings.pkl.go @@ -6,9 +6,9 @@ import "github.com/kdeps/schema/gen/llm/llmbackend" type LLMSettings struct { LlmAPIKeys *LLMAPIKeys `pkl:"llmAPIKeys"` - LlmBackend llmbackend.LLMBackend `pkl:"llmBackend"` + LlmFallbackBackend llmbackend.LLMBackend `pkl:"llmFallbackBackend"` - LlmModel string `pkl:"llmModel"` + LlmFallbackModel string `pkl:"llmFallbackModel"` ModelFile *ModelFile `pkl:"modelFile"` } diff --git a/gen/llm/ResourceChat.pkl.go b/gen/llm/ResourceChat.pkl.go index 05a1592..3fff6b6 100644 --- a/gen/llm/ResourceChat.pkl.go +++ b/gen/llm/ResourceChat.pkl.go @@ -1,7 +1,13 @@ // Code generated from Pkl module `org.kdeps.pkl.LLM`. DO NOT EDIT. package llm +import "github.com/kdeps/schema/gen/llm/llmbackend" + type ResourceChat struct { + Backend llmbackend.LLMBackend `pkl:"backend"` + + Model string `pkl:"model"` + Prompt string `pkl:"prompt"` Input *string `pkl:"input"` diff --git a/gen/llm/ResourceChatSchema.pkl.go b/gen/llm/ResourceChatSchema.pkl.go index 16bca82..89731e3 100644 --- a/gen/llm/ResourceChatSchema.pkl.go +++ b/gen/llm/ResourceChatSchema.pkl.go @@ -1,7 +1,13 @@ // Code generated from Pkl module `org.kdeps.pkl.LLM`. DO NOT EDIT. package llm +import "github.com/kdeps/schema/gen/llm/llmbackend" + type ResourceChatSchema struct { + Backend llmbackend.LLMBackend `pkl:"backend"` + + Model string `pkl:"model"` + Prompt string `pkl:"prompt"` Schema string `pkl:"schema"`