Documentation
¶
Index ¶
- func ComputeCacheKeyForChatCompletionRequest(path string, req *goopenai.ChatCompletionRequest) string
- func ComputeCacheKeyForEmbeddingsRequest(path string, req *goopenai.EmbeddingRequest) string
- func ConvertToArrayOfStrings(input []any) []string
- func ConvertToMapOfIntegers(input any) map[string]int
- type CacheConfig
- type Request
- type Response
- type Route
- type Step
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeCacheKeyForChatCompletionRequest ¶ added in v1.7.1
func ComputeCacheKeyForChatCompletionRequest(path string, req *goopenai.ChatCompletionRequest) string
func ComputeCacheKeyForEmbeddingsRequest ¶ added in v1.7.1
func ComputeCacheKeyForEmbeddingsRequest(path string, req *goopenai.EmbeddingRequest) string
func ConvertToArrayOfStrings ¶ added in v1.25.0
func ConvertToMapOfIntegers ¶ added in v1.25.0
Types ¶
type CacheConfig ¶
type Request ¶
type Route ¶
type Route struct { Id string `json:"id"` RequestFormat string `json:"requestFormat"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` Name string `json:"name"` Path string `json:"path"` KeyIds []string `json:"keyIds"` Steps []*Step `json:"steps"` CacheConfig *CacheConfig `json:"cacheConfig"` }
func (*Route) ShouldRunEmbeddings ¶
type Step ¶
type Step struct { Retries int `json:"retries"` Provider string `json:"provider"` RequestParams map[string]any `json:"requestParams"` Params map[string]string `json:"params"` Model string `json:"model"` Timeout string `json:"timeout"` }
func (*Step) DecorateChatCompletionRequest ¶ added in v1.25.0
func (s *Step) DecorateChatCompletionRequest(req *goopenai.ChatCompletionRequest)
Click to show internal directories.
Click to hide internal directories.