MCPcopy
hub / github.com/elastic/go-elasticsearch / newInferencePutCohereFunc

Function newInferencePutCohereFunc

esapi/api.inference.put_cohere.go:30–43  ·  view source on GitHub ↗
(t Transport)

Source from the content-addressed store, hash-verified

28)
29
30func newInferencePutCohereFunc(t Transport) InferencePutCohere {
31 return func(body io.Reader, cohere_inference_id string, task_type string, o ...func(*InferencePutCohereRequest)) (*Response, error) {
32 var r = InferencePutCohereRequest{Body: body, CohereInferenceID: cohere_inference_id, TaskType: task_type}
33 for _, f := range o {
34 f(&r)
35 }
36
37 if transport, ok := t.(Instrumented); ok {
38 r.Instrument = transport.InstrumentationEnabled()
39 }
40
41 return r.Do(r.ctx, t)
42 }
43}
44
45// ----- API Definition -------------------------------------------------------
46

Callers 1

NewFunction · 0.85

Calls 2

DoMethod · 0.65

Tested by

no test coverage detected