MCPcopy
hub / github.com/openai/openai-go / WithQueryAdd

Function WithQueryAdd

option/requestoption.go:150–157  ·  view source on GitHub ↗

WithQueryAdd returns a RequestOption that adds the query value to the associated key. It appends onto any existing values.

(key, value string)

Source from the content-addressed store, hash-verified

148// WithQueryAdd returns a RequestOption that adds the query value to the associated key. It appends
149// onto any existing values.
150func WithQueryAdd(key, value string) RequestOption {
151 return requestconfig.RequestOptionFunc(func(r *requestconfig.RequestConfig) error {
152 query := r.Request.URL.Query()
153 query.Add(key, value)
154 r.Request.URL.RawQuery = query.Encode()
155 return nil
156 })
157}
158
159// WithQueryDel returns a RequestOption that deletes the query value(s) associated with the key.
160func WithQueryDel(key string) RequestOption {

Callers 1

WithEndpointFunction · 0.92

Calls 2

RequestOptionFuncFuncType · 0.92
EncodeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…