-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.go
More file actions
48 lines (39 loc) · 1.01 KB
/
types.go
File metadata and controls
48 lines (39 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package main
type DBConfig struct {
Engine string
Name string
User string
Password string
Host string
Port string
}
type DPromptsSubTask struct {
Prompt string `json:"prompt"`
Schema interface{} `json:"schema,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"` // <-- new
}
type DPromptsJobArgs struct {
SubTasks []DPromptsSubTask `json:"sub_tasks"`
BasePrompt string `json:"base_prompt,omitempty"`
}
type DPromptsJobResult struct {
Response string `json:"response"`
}
func (DPromptsJobArgs) Kind() string {
return "dprompts-worker"
}
type LLMConfig struct {
APIEndpoint string `toml:"api-endpoint"`
Model string `toml:"model"`
Temperature float64 `toml:"temperature"`
TopP float64 `toml:"topP"`
}
type OllamaResponse struct {
Message struct {
Role string `json:"role"`
Content string `json:"content"`
} `json:"message"`
}
type WorkerConfig struct {
ConcurrentWorkers int `toml:"concurrent_workers"`
}