github.com/TScafeJR/genai/deepseek
Package deepseek provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Package
Files: 3. Third party imports: 1. Imports from organisation: 0. Tests: 0. Benchmarks: 0.
Types
Cfg
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| Logger |
|
No comment on field. |
| ApiKey |
|
No comment on field. |
| Models |
|
No comment on field. |
| Local |
|
No comment on field. |
| HttpClient |
|
No comment on field. |
Client
Client which conforms to the OpenAPI3 specification for this service.
| Field name | Field type | Comment |
|---|---|---|
| Server |
|
The endpoint of the server conforming to this interface, with scheme, https://api.deepmap.com for example. This can contain a path relative to the server, such as https://api.deepmap.com/dev-test, and all the paths in the swagger spec will be appended to the server. |
| Client |
|
Doer for performing requests, typically a *http.Client with any customized settings, such as certificate chains. |
| RequestEditors |
|
A list of callbacks for modifying requests which are generated before sending over the network. |
ClientInterface
The interface specification for the client above.
| Field name | Field type | Comment |
|---|---|---|
| type |
|
No comment on field. |
ClientOption
ClientOption allows setting custom parameters during construction
| Field name | Field type | Comment |
|---|---|---|
| type |
|
No comment on field. |
ClientWithResponses
ClientWithResponses builds on ClientInterface to offer response payloads
| Field name | Field type | Comment |
|---|---|---|
|
No comment on field. |
ClientWithResponsesInterface
ClientWithResponsesInterface is the interface specification for the client with responses above.
| Field name | Field type | Comment |
|---|---|---|
| type |
|
No comment on field. |
DeepseekClient
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| logger |
|
No comment on field. |
| client |
|
No comment on field. |
| url |
|
No comment on field. |
| httpClient |
|
No comment on field. |
| apiKey |
|
No comment on field. |
GenerateContentJSONBody
GenerateContentJSONBody defines parameters for GenerateContent.
| Field name | Field type | Comment |
|---|---|---|
| Options |
|
Options Optional settings for content generation. |
| Prompt |
|
Prompt Input text prompt to guide content generation. |
GenerateContentJSONRequestBody
GenerateContentJSONRequestBody defines body for GenerateContent for application/json ContentType.
| Field name | Field type | Comment |
|---|---|---|
| type |
|
No comment on field. |
GenerateContentResponse
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| Body |
|
No comment on field. |
| HTTPResponse |
|
No comment on field. |
| JSON200 |
|
No comment on field. |
HttpRequestDoer
Doer performs HTTP requests.
The standard http.Client implements this interface.
| Field name | Field type | Comment |
|---|---|---|
| type |
|
No comment on field. |
Models
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| Text |
|
No comment on field. |
| MultiModal |
|
No comment on field. |
RequestEditorFn
RequestEditorFn is the function signature for the RequestEditor callback function
| Field name | Field type | Comment |
|---|---|---|
| type |
|
No comment on field. |
Functions
func NewClient
Creates a new Client, with reasonable defaults
Uses: http.Client, strings.HasSuffix.func NewClientWithResponses
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func NewDeepseekClient
func NewGenerateContentRequest
NewGenerateContentRequest calls the generic GenerateContent builder with application/json body
Uses: bytes.NewReader, io.Reader, json.Marshal.func NewGenerateContentRequestWithBody
NewGenerateContentRequestWithBody generates requests for GenerateContent with any type of body
Uses: fmt.Sprintf, http.NewRequest, url.Parse.func ParseGenerateContentResponse
ParseGenerateContentResponse parses an HTTP response from a GenerateContentWithResponse call
Uses: io.ReadAll, json.Unmarshal, strings.Contains.func WithBaseURL
WithBaseURL overrides the baseURL.
Uses: url.Parse.func WithHTTPClient
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
func (*Client) GenerateContent
func (*Client) GenerateContentWithBody
func (*ClientWithResponses) GenerateContentWithBodyWithResponse
GenerateContentWithBodyWithResponse request with arbitrary body returning *GenerateContentResponse
func (*ClientWithResponses) GenerateContentWithResponse
func (Cfg) Validate
func (DeepseekClient) GenerateContent
func (GenerateContentResponse) Status
Status returns HTTPResponse.Status
Uses: http.StatusText.func (GenerateContentResponse) StatusCode
StatusCode returns HTTPResponse.StatusCode