Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ManyCompletions ¶
func ManyCompletions( ctx context.Context, providers []provider.IProvider, options ...provider.Func) (map[string]string, error, )
ManyCompletions generates one or more completions. It returns a map of the provider and its respective response. The response is a string. Use this method for simple, and straightforward completions.
NOTE: Not all options are available for all providers.
NOTE: Do not pass WithResponseBody, it will not be used, and the content will be wrong.
SEE: utils_test.go for example.
func TypedManyCompletions ¶
func TypedManyCompletions[T any]( ctx context.Context, providers []provider.IProvider, options ...provider.Func) (map[string]T, error, )
TypedManyCompletions generates one or more completions. It returns a map correlating the provider and its respective response. The response `T`, is whatever the developer specified. This method is a more powerful, and flexible version of ManyCompletions. Use this in cases where the response is not a string, but needs to be unmarshalled (processed).
NOTE: Not all options are available for all providers.
NOTE: Do not pass WithResponseBody, it will not be used, and the content will be wrong.
SEE: utils_test.go for example.
Types ¶
This section is empty.