Documentation
¶
Index ¶
- func ExecuteCode(executionUnit ExecutionUnit)
- func ExecuteInference(inferenceUnit InferenceUnit)
- func ExecutorWorker(id int)
- func GetChatCompletion(apiKey, message string, modelName string) (string, error)
- func InferenceWorker(id int)
- func InitializeBackpressureWatchdog()
- func LaunchInstance(request *common.StartEndpointRequest) (*common.LaunchResponse, error)
- func RemoveGolangMain(sourceCode string) string
- func StandarizeCode(executionUnit ExecutionUnit) string
- func StopInstance(request *common.StopEndpointRequest) (*common.LaunchResponse, error)
- func WriteCodeToFilesystem(sourceCode string, language string) (string, string, string, bool)
- type BackpressureWatchdog
- type ChatCompletionRequest
- type ChatCompletionResponse
- type Choice
- type ExecutorQueueSingleton
- type InferenceQueueSingleton
- type LimitedBuffer
- type Message
- type MyRoundTripper
- type RoundRobinApiCaller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteCode ¶
func ExecuteCode(executionUnit ExecutionUnit)
func ExecuteInference ¶
func ExecuteInference(inferenceUnit InferenceUnit)
func GetChatCompletion ¶
func InitializeBackpressureWatchdog ¶
func InitializeBackpressureWatchdog()
func LaunchInstance ¶
func LaunchInstance(request *common.StartEndpointRequest) (*common.LaunchResponse, error)
func RemoveGolangMain ¶
func StandarizeCode ¶
func StandarizeCode(executionUnit ExecutionUnit) string
We need to standarize the code for some programming languages
func StopInstance ¶
func StopInstance(request *common.StopEndpointRequest) (*common.LaunchResponse, error)
Types ¶
type BackpressureWatchdog ¶
type BackpressureWatchdog struct {
// contains filtered or unexported fields
}
func (*BackpressureWatchdog) CountExecution ¶
func (watchdog *BackpressureWatchdog) CountExecution()
func (*BackpressureWatchdog) CountInference ¶
func (watchdog *BackpressureWatchdog) CountInference()
type ChatCompletionRequest ¶
type ChatCompletionRequest struct {
Model string `json:"model"`
Messages []Message `json:"messages"`
ExtraFields map[string]interface{} `json:"extra_fields,omitempty"`
MaxTokens int `json:"max_tokens,omitempty"`
SkipSpecialTokens bool `json:"skip_special_tokens,omitempty"`
Temperature float32 `json:"temperature,omitempty"`
TopP float32 `json:"top_p,omitempty"`
TopK int `json:"top_k,omitempty"`
Seed int `json:"seed,omitempty"`
N int `json:"n,omitempty"`
}
type ChatCompletionResponse ¶
type ExecutorQueueSingleton ¶
type ExecutorQueueSingleton struct {
InputChannel chan ExecutionUnit
// contains filtered or unexported fields
}
func GetExecutorQueueInstance ¶
func GetExecutorQueueInstance() *ExecutorQueueSingleton
type InferenceQueueSingleton ¶
type InferenceQueueSingleton struct {
InputChannel chan InferenceUnit
// contains filtered or unexported fields
}
func GetInferenceQueueInstance ¶
func GetInferenceQueueInstance() *InferenceQueueSingleton
type LimitedBuffer ¶
type LimitedBuffer struct {
// contains filtered or unexported fields
}
func (*LimitedBuffer) Bytes ¶
func (lb *LimitedBuffer) Bytes() []byte
func (*LimitedBuffer) Reset ¶
func (lb *LimitedBuffer) Reset()
func (*LimitedBuffer) String ¶
func (lb *LimitedBuffer) String() string
type MyRoundTripper ¶
type MyRoundTripper struct {
// contains filtered or unexported fields
}
type RoundRobinApiCaller ¶
type RoundRobinApiCaller struct {
// contains filtered or unexported fields
}
func GetRoundRobin ¶
func GetRoundRobin() *RoundRobinApiCaller
func (*RoundRobinApiCaller) GetNext ¶
func (roundRobinApiCaller *RoundRobinApiCaller) GetNext() string
Click to show internal directories.
Click to hide internal directories.