Documentation
¶
Index ¶
- type ChatQueryInternalServerError
- func (o *ChatQueryInternalServerError) Code() int
- func (o *ChatQueryInternalServerError) Error() string
- func (o *ChatQueryInternalServerError) IsClientError() bool
- func (o *ChatQueryInternalServerError) IsCode(code int) bool
- func (o *ChatQueryInternalServerError) IsRedirect() bool
- func (o *ChatQueryInternalServerError) IsServerError() bool
- func (o *ChatQueryInternalServerError) IsSuccess() bool
- func (o *ChatQueryInternalServerError) String() string
- type ChatQueryOK
- func (o *ChatQueryOK) Code() int
- func (o *ChatQueryOK) Error() string
- func (o *ChatQueryOK) GetPayload() *models.ChatChatQueryResponse
- func (o *ChatQueryOK) IsClientError() bool
- func (o *ChatQueryOK) IsCode(code int) bool
- func (o *ChatQueryOK) IsRedirect() bool
- func (o *ChatQueryOK) IsServerError() bool
- func (o *ChatQueryOK) IsSuccess() bool
- func (o *ChatQueryOK) String() string
- type ChatQueryParams
- func (o *ChatQueryParams) SetBody(body *models.ChatChatQueryPayload)
- func (o *ChatQueryParams) SetContext(ctx context.Context)
- func (o *ChatQueryParams) SetDefaults()
- func (o *ChatQueryParams) SetHTTPClient(client *http.Client)
- func (o *ChatQueryParams) SetTimeout(timeout time.Duration)
- func (o *ChatQueryParams) WithBody(body *models.ChatChatQueryPayload) *ChatQueryParams
- func (o *ChatQueryParams) WithContext(ctx context.Context) *ChatQueryParams
- func (o *ChatQueryParams) WithDefaults() *ChatQueryParams
- func (o *ChatQueryParams) WithHTTPClient(client *http.Client) *ChatQueryParams
- func (o *ChatQueryParams) WithTimeout(timeout time.Duration) *ChatQueryParams
- func (o *ChatQueryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type ChatQueryReader
- type Client
- type ClientOption
- type ClientService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatQueryInternalServerError ¶
type ChatQueryInternalServerError struct {
}
ChatQueryInternalServerError describes a response with status code 500, with default header values.
Server error
func NewChatQueryInternalServerError ¶
func NewChatQueryInternalServerError() *ChatQueryInternalServerError
NewChatQueryInternalServerError creates a ChatQueryInternalServerError with default headers values
func (*ChatQueryInternalServerError) Code ¶
func (o *ChatQueryInternalServerError) Code() int
Code gets the status code for the chat query internal server error response
func (*ChatQueryInternalServerError) Error ¶
func (o *ChatQueryInternalServerError) Error() string
func (*ChatQueryInternalServerError) IsClientError ¶
func (o *ChatQueryInternalServerError) IsClientError() bool
IsClientError returns true when this chat query internal server error response has a 4xx status code
func (*ChatQueryInternalServerError) IsCode ¶
func (o *ChatQueryInternalServerError) IsCode(code int) bool
IsCode returns true when this chat query internal server error response a status code equal to that given
func (*ChatQueryInternalServerError) IsRedirect ¶
func (o *ChatQueryInternalServerError) IsRedirect() bool
IsRedirect returns true when this chat query internal server error response has a 3xx status code
func (*ChatQueryInternalServerError) IsServerError ¶
func (o *ChatQueryInternalServerError) IsServerError() bool
IsServerError returns true when this chat query internal server error response has a 5xx status code
func (*ChatQueryInternalServerError) IsSuccess ¶
func (o *ChatQueryInternalServerError) IsSuccess() bool
IsSuccess returns true when this chat query internal server error response has a 2xx status code
func (*ChatQueryInternalServerError) String ¶
func (o *ChatQueryInternalServerError) String() string
type ChatQueryOK ¶
type ChatQueryOK struct {
Payload *models.ChatChatQueryResponse
}
ChatQueryOK describes a response with status code 200, with default header values.
Success
func NewChatQueryOK ¶
func NewChatQueryOK() *ChatQueryOK
NewChatQueryOK creates a ChatQueryOK with default headers values
func (*ChatQueryOK) Code ¶
func (o *ChatQueryOK) Code() int
Code gets the status code for the chat query o k response
func (*ChatQueryOK) Error ¶
func (o *ChatQueryOK) Error() string
func (*ChatQueryOK) GetPayload ¶
func (o *ChatQueryOK) GetPayload() *models.ChatChatQueryResponse
func (*ChatQueryOK) IsClientError ¶
func (o *ChatQueryOK) IsClientError() bool
IsClientError returns true when this chat query o k response has a 4xx status code
func (*ChatQueryOK) IsCode ¶
func (o *ChatQueryOK) IsCode(code int) bool
IsCode returns true when this chat query o k response a status code equal to that given
func (*ChatQueryOK) IsRedirect ¶
func (o *ChatQueryOK) IsRedirect() bool
IsRedirect returns true when this chat query o k response has a 3xx status code
func (*ChatQueryOK) IsServerError ¶
func (o *ChatQueryOK) IsServerError() bool
IsServerError returns true when this chat query o k response has a 5xx status code
func (*ChatQueryOK) IsSuccess ¶
func (o *ChatQueryOK) IsSuccess() bool
IsSuccess returns true when this chat query o k response has a 2xx status code
func (*ChatQueryOK) String ¶
func (o *ChatQueryOK) String() string
type ChatQueryParams ¶
type ChatQueryParams struct {
/* Body.
Query
*/
Body *models.ChatChatQueryPayload
Context context.Context
HTTPClient *http.Client
// contains filtered or unexported fields
}
ChatQueryParams contains all the parameters to send to the API endpoint
for the chat query operation. Typically these are written to a http.Request.
func NewChatQueryParams ¶
func NewChatQueryParams() *ChatQueryParams
NewChatQueryParams creates a new ChatQueryParams object, with the default timeout for this client.
Default values are not hydrated, since defaults are normally applied by the API server side.
To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewChatQueryParamsWithContext ¶
func NewChatQueryParamsWithContext(ctx context.Context) *ChatQueryParams
NewChatQueryParamsWithContext creates a new ChatQueryParams object with the ability to set a context for a request.
func NewChatQueryParamsWithHTTPClient ¶
func NewChatQueryParamsWithHTTPClient(client *http.Client) *ChatQueryParams
NewChatQueryParamsWithHTTPClient creates a new ChatQueryParams object with the ability to set a custom HTTPClient for a request.
func NewChatQueryParamsWithTimeout ¶
func NewChatQueryParamsWithTimeout(timeout time.Duration) *ChatQueryParams
NewChatQueryParamsWithTimeout creates a new ChatQueryParams object with the ability to set a timeout on a request.
func (*ChatQueryParams) SetBody ¶
func (o *ChatQueryParams) SetBody(body *models.ChatChatQueryPayload)
SetBody adds the body to the chat query params
func (*ChatQueryParams) SetContext ¶
func (o *ChatQueryParams) SetContext(ctx context.Context)
SetContext adds the context to the chat query params
func (*ChatQueryParams) SetDefaults ¶
func (o *ChatQueryParams) SetDefaults()
SetDefaults hydrates default values in the chat query params (not the query body).
All values with no default are reset to their zero value.
func (*ChatQueryParams) SetHTTPClient ¶
func (o *ChatQueryParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the chat query params
func (*ChatQueryParams) SetTimeout ¶
func (o *ChatQueryParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the chat query params
func (*ChatQueryParams) WithBody ¶
func (o *ChatQueryParams) WithBody(body *models.ChatChatQueryPayload) *ChatQueryParams
WithBody adds the body to the chat query params
func (*ChatQueryParams) WithContext ¶
func (o *ChatQueryParams) WithContext(ctx context.Context) *ChatQueryParams
WithContext adds the context to the chat query params
func (*ChatQueryParams) WithDefaults ¶
func (o *ChatQueryParams) WithDefaults() *ChatQueryParams
WithDefaults hydrates default values in the chat query params (not the query body).
All values with no default are reset to their zero value.
func (*ChatQueryParams) WithHTTPClient ¶
func (o *ChatQueryParams) WithHTTPClient(client *http.Client) *ChatQueryParams
WithHTTPClient adds the HTTPClient to the chat query params
func (*ChatQueryParams) WithTimeout ¶
func (o *ChatQueryParams) WithTimeout(timeout time.Duration) *ChatQueryParams
WithTimeout adds the timeout to the chat query params
func (*ChatQueryParams) WriteToRequest ¶
func (o *ChatQueryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type ChatQueryReader ¶
type ChatQueryReader struct {
// contains filtered or unexported fields
}
ChatQueryReader is a Reader for the ChatQuery structure.
func (*ChatQueryReader) ReadResponse ¶
func (o *ChatQueryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for chat API
func (*Client) ChatQuery ¶
func (a *Client) ChatQuery(params *ChatQueryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ChatQueryOK, error)
ChatQuery sends a chat query to the open a i API Send a chat query to the OpenAI API.
**Access policy**: user
func (*Client) SetTransport ¶
func (a *Client) SetTransport(transport runtime.ClientTransport)
SetTransport changes the transport on the client
type ClientOption ¶
type ClientOption func(*runtime.ClientOperation)
ClientOption may be used to customize the behavior of Client methods.
type ClientService ¶
type ClientService interface {
ChatQuery(params *ChatQueryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ChatQueryOK, error)
SetTransport(transport runtime.ClientTransport)
}
ClientService is the interface for Client methods
func New ¶
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService
New creates a new chat API client.
func NewClientWithBasicAuth ¶
func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService
New creates a new chat API client with basic auth credentials. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - user: user for basic authentication header. - password: password for basic authentication header.
func NewClientWithBearerToken ¶
func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService
New creates a new chat API client with a bearer token for authentication. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - bearerToken: bearer token for Bearer authentication header.