Documentation
¶
Overview ¶
Package tinker provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
Package tinker is a Go client for the Thinking Machines Tinker API, generated with oapi-codegen from the OpenAPI document published with Thinking Machines' Tinker SDK.
Example ¶
This is the README usage example. It talks to the live API, so it has no Output comment and only has to compile.
package main
import (
"context"
"net/http"
"os"
"github.com/psyb0t/go-tinker"
)
func main() {
auth := tinker.WithRequestEditorFn(
func(_ context.Context, req *http.Request) error {
req.Header.Set("X-API-Key", os.Getenv("TINKER_API_KEY"))
return nil
},
)
client, err := tinker.NewClientWithResponses(
"https://tinker.thinkingmachines.dev/services/tinker-prod",
auth,
)
if err != nil {
panic(err)
}
res, err := client.GetServerCapabilitiesWithResponse(context.Background())
if err != nil {
panic(err)
}
_ = res.JSON200
}
Output:
Index ¶
- func NewAsampleRequest(server string, body AsampleJSONRequestBody) (*http.Request, error)
- func NewAsampleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateModelRequest(server string, body CreateModelJSONRequestBody) (*http.Request, error)
- func NewCreateModelRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewForwardBackwardRequest(server string, body ForwardBackwardJSONRequestBody) (*http.Request, error)
- func NewForwardBackwardRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewForwardRequest(server string, body ForwardJSONRequestBody) (*http.Request, error)
- func NewForwardRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewGetInfoRequest(server string, body GetInfoJSONRequestBody) (*http.Request, error)
- func NewGetInfoRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewGetServerCapabilitiesRequest(server string) (*http.Request, error)
- func NewHealthCheckRequest(server string) (*http.Request, error)
- func NewLoadWeightsRequest(server string, body LoadWeightsJSONRequestBody) (*http.Request, error)
- func NewLoadWeightsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewOptimStepRequest(server string, body OptimStepJSONRequestBody) (*http.Request, error)
- func NewOptimStepRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewReceiveTelemetryRequest(server string, body ReceiveTelemetryJSONRequestBody) (*http.Request, error)
- func NewReceiveTelemetryRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewRetrieveFutureRequest(server string, body RetrieveFutureJSONRequestBody) (*http.Request, error)
- func NewRetrieveFutureRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewSampleRequest(server string, body SampleJSONRequestBody) (*http.Request, error)
- func NewSampleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewSaveWeightsForSamplerRequest(server string, body SaveWeightsForSamplerJSONRequestBody) (*http.Request, error)
- func NewSaveWeightsForSamplerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewSaveWeightsRequest(server string, body SaveWeightsJSONRequestBody) (*http.Request, error)
- func NewSaveWeightsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewUnloadModelRequest(server string, body UnloadModelJSONRequestBody) (*http.Request, error)
- func NewUnloadModelRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- type AdamParams
- type AsampleHTTPResponse
- type AsampleJSONRequestBody
- type Client
- func (c *Client) Asample(ctx context.Context, body AsampleJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) AsampleWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateModel(ctx context.Context, body CreateModelJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateModelWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) Forward(ctx context.Context, body ForwardJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) ForwardBackward(ctx context.Context, body ForwardBackwardJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) ForwardBackwardWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) ForwardWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) GetInfo(ctx context.Context, body GetInfoJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) GetInfoWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) GetServerCapabilities(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) HealthCheck(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) LoadWeights(ctx context.Context, body LoadWeightsJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) LoadWeightsWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) OptimStep(ctx context.Context, body OptimStepJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) OptimStepWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) ReceiveTelemetry(ctx context.Context, body ReceiveTelemetryJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) ReceiveTelemetryWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) RetrieveFuture(ctx context.Context, body RetrieveFutureJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) RetrieveFutureWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) Sample(ctx context.Context, body SampleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) SampleWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) SaveWeights(ctx context.Context, body SaveWeightsJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) SaveWeightsForSampler(ctx context.Context, body SaveWeightsForSamplerJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) SaveWeightsForSamplerWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) SaveWeightsWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UnloadModel(ctx context.Context, body UnloadModelJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UnloadModelWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) AsampleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*AsampleHTTPResponse, error)
- func (c *ClientWithResponses) AsampleWithResponse(ctx context.Context, body AsampleJSONRequestBody, ...) (*AsampleHTTPResponse, error)
- func (c *ClientWithResponses) CreateModelWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateModelHTTPResponse, error)
- func (c *ClientWithResponses) CreateModelWithResponse(ctx context.Context, body CreateModelJSONRequestBody, ...) (*CreateModelHTTPResponse, error)
- func (c *ClientWithResponses) ForwardBackwardWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*ForwardBackwardHTTPResponse, error)
- func (c *ClientWithResponses) ForwardBackwardWithResponse(ctx context.Context, body ForwardBackwardJSONRequestBody, ...) (*ForwardBackwardHTTPResponse, error)
- func (c *ClientWithResponses) ForwardWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*ForwardHTTPResponse, error)
- func (c *ClientWithResponses) ForwardWithResponse(ctx context.Context, body ForwardJSONRequestBody, ...) (*ForwardHTTPResponse, error)
- func (c *ClientWithResponses) GetInfoWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*GetInfoHTTPResponse, error)
- func (c *ClientWithResponses) GetInfoWithResponse(ctx context.Context, body GetInfoJSONRequestBody, ...) (*GetInfoHTTPResponse, error)
- func (c *ClientWithResponses) GetServerCapabilitiesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetServerCapabilitiesHTTPResponse, error)
- func (c *ClientWithResponses) HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckHTTPResponse, error)
- func (c *ClientWithResponses) LoadWeightsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*LoadWeightsHTTPResponse, error)
- func (c *ClientWithResponses) LoadWeightsWithResponse(ctx context.Context, body LoadWeightsJSONRequestBody, ...) (*LoadWeightsHTTPResponse, error)
- func (c *ClientWithResponses) OptimStepWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*OptimStepHTTPResponse, error)
- func (c *ClientWithResponses) OptimStepWithResponse(ctx context.Context, body OptimStepJSONRequestBody, ...) (*OptimStepHTTPResponse, error)
- func (c *ClientWithResponses) ReceiveTelemetryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*ReceiveTelemetryHTTPResponse, error)
- func (c *ClientWithResponses) ReceiveTelemetryWithResponse(ctx context.Context, body ReceiveTelemetryJSONRequestBody, ...) (*ReceiveTelemetryHTTPResponse, error)
- func (c *ClientWithResponses) RetrieveFutureWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*RetrieveFutureHTTPResponse, error)
- func (c *ClientWithResponses) RetrieveFutureWithResponse(ctx context.Context, body RetrieveFutureJSONRequestBody, ...) (*RetrieveFutureHTTPResponse, error)
- func (c *ClientWithResponses) SampleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*SampleHTTPResponse, error)
- func (c *ClientWithResponses) SampleWithResponse(ctx context.Context, body SampleJSONRequestBody, reqEditors ...RequestEditorFn) (*SampleHTTPResponse, error)
- func (c *ClientWithResponses) SaveWeightsForSamplerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*SaveWeightsForSamplerHTTPResponse, error)
- func (c *ClientWithResponses) SaveWeightsForSamplerWithResponse(ctx context.Context, body SaveWeightsForSamplerJSONRequestBody, ...) (*SaveWeightsForSamplerHTTPResponse, error)
- func (c *ClientWithResponses) SaveWeightsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*SaveWeightsHTTPResponse, error)
- func (c *ClientWithResponses) SaveWeightsWithResponse(ctx context.Context, body SaveWeightsJSONRequestBody, ...) (*SaveWeightsHTTPResponse, error)
- func (c *ClientWithResponses) UnloadModelWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*UnloadModelHTTPResponse, error)
- func (c *ClientWithResponses) UnloadModelWithResponse(ctx context.Context, body UnloadModelJSONRequestBody, ...) (*UnloadModelHTTPResponse, error)
- type ClientWithResponsesInterface
- type CreateModelHTTPResponse
- type CreateModelJSONRequestBody
- type CreateModelRequest
- type CreateModelRequestType
- type CreateModelResponse
- type CreateModelResponseType
- type Datum
- type EncodedTextChunk
- type EncodedTextChunkType
- type ErrorResponse
- type EventType
- type ForwardBackwardHTTPResponse
- type ForwardBackwardInput
- type ForwardBackwardJSONBody
- type ForwardBackwardJSONRequestBody
- type ForwardBackwardOutput
- type ForwardBackwardOutputMetrics0
- type ForwardBackwardOutputMetrics1
- type ForwardBackwardOutput_Metrics_AdditionalProperties
- func (t ForwardBackwardOutput_Metrics_AdditionalProperties) AsForwardBackwardOutputMetrics0() (ForwardBackwardOutputMetrics0, error)
- func (t ForwardBackwardOutput_Metrics_AdditionalProperties) AsForwardBackwardOutputMetrics1() (ForwardBackwardOutputMetrics1, error)
- func (t *ForwardBackwardOutput_Metrics_AdditionalProperties) FromForwardBackwardOutputMetrics0(v ForwardBackwardOutputMetrics0) error
- func (t *ForwardBackwardOutput_Metrics_AdditionalProperties) FromForwardBackwardOutputMetrics1(v ForwardBackwardOutputMetrics1) error
- func (t ForwardBackwardOutput_Metrics_AdditionalProperties) MarshalJSON() ([]byte, error)
- func (t *ForwardBackwardOutput_Metrics_AdditionalProperties) MergeForwardBackwardOutputMetrics0(v ForwardBackwardOutputMetrics0) error
- func (t *ForwardBackwardOutput_Metrics_AdditionalProperties) MergeForwardBackwardOutputMetrics1(v ForwardBackwardOutputMetrics1) error
- func (t *ForwardBackwardOutput_Metrics_AdditionalProperties) UnmarshalJSON(b []byte) error
- type ForwardHTTPResponse
- type ForwardJSONBody
- type ForwardJSONRequestBody
- type GetInfoHTTPResponse
- type GetInfoJSONRequestBody
- type GetInfoRequest
- type GetInfoRequestType
- type GetInfoResponse
- type GetServerCapabilitiesHTTPResponse
- func (r GetServerCapabilitiesHTTPResponse) ContentType() string
- func (r GetServerCapabilitiesHTTPResponse) GetBody() []byte
- func (r GetServerCapabilitiesHTTPResponse) GetJSON200() *GetServerCapabilitiesResponse
- func (r GetServerCapabilitiesHTTPResponse) Status() string
- func (r GetServerCapabilitiesHTTPResponse) StatusCode() int
- type GetServerCapabilitiesResponse
- type HealthCheckHTTPResponse
- type HealthResponse
- type HealthResponseStatus
- type HttpRequestDoer
- type ImageAssetPointerChunk
- type ImageAssetPointerChunkFormat
- type ImageAssetPointerChunkType
- type LoadWeightsHTTPResponse
- type LoadWeightsJSONRequestBody
- type LoadWeightsRequest
- type LoadWeightsRequestType
- type LoadWeightsResponse
- type LoadWeightsResponseType
- type LoraConfig
- type LossFnInputs
- type LossFnOutput
- type LossFnType
- type ModelId
- type ModelInput
- type ModelInputChunk
- func (t ModelInputChunk) AsEncodedTextChunk() (EncodedTextChunk, error)
- func (t ModelInputChunk) AsImageAssetPointerChunk() (ImageAssetPointerChunk, error)
- func (t ModelInputChunk) Discriminator() (string, error)
- func (t *ModelInputChunk) FromEncodedTextChunk(v EncodedTextChunk) error
- func (t *ModelInputChunk) FromImageAssetPointerChunk(v ImageAssetPointerChunk) error
- func (t ModelInputChunk) MarshalJSON() ([]byte, error)
- func (t *ModelInputChunk) MergeEncodedTextChunk(v EncodedTextChunk) error
- func (t *ModelInputChunk) MergeImageAssetPointerChunk(v ImageAssetPointerChunk) error
- func (t *ModelInputChunk) UnmarshalJSON(b []byte) error
- func (t ModelInputChunk) ValueByDiscriminator() (interface{}, error)
- type OptimStepHTTPResponse
- type OptimStepJSONRequestBody
- type OptimStepRequest
- type OptimStepRequestType
- type OptimStepResponse
- type OptimStepResponse0
- type OptimStepResponse1
- type OptimStepResponse2
- type OptimStepResponse_AdditionalProperties
- func (t OptimStepResponse_AdditionalProperties) AsOptimStepResponse0() (OptimStepResponse0, error)
- func (t OptimStepResponse_AdditionalProperties) AsOptimStepResponse1() (OptimStepResponse1, error)
- func (t OptimStepResponse_AdditionalProperties) AsOptimStepResponse2() (OptimStepResponse2, error)
- func (t *OptimStepResponse_AdditionalProperties) FromOptimStepResponse0(v OptimStepResponse0) error
- func (t *OptimStepResponse_AdditionalProperties) FromOptimStepResponse1(v OptimStepResponse1) error
- func (t *OptimStepResponse_AdditionalProperties) FromOptimStepResponse2(v OptimStepResponse2) error
- func (t OptimStepResponse_AdditionalProperties) MarshalJSON() ([]byte, error)
- func (t *OptimStepResponse_AdditionalProperties) MergeOptimStepResponse0(v OptimStepResponse0) error
- func (t *OptimStepResponse_AdditionalProperties) MergeOptimStepResponse1(v OptimStepResponse1) error
- func (t *OptimStepResponse_AdditionalProperties) MergeOptimStepResponse2(v OptimStepResponse2) error
- func (t *OptimStepResponse_AdditionalProperties) UnmarshalJSON(b []byte) error
- type ReceiveTelemetryHTTPResponse
- type ReceiveTelemetryJSONRequestBody
- type RequestEditorFn
- type RequestId
- type RetrieveFuture200JSONResponseBody
- func (t RetrieveFuture200JSONResponseBody) AsCreateModelResponse() (CreateModelResponse, error)
- func (t RetrieveFuture200JSONResponseBody) AsForwardBackwardOutput() (ForwardBackwardOutput, error)
- func (t RetrieveFuture200JSONResponseBody) AsLoadWeightsResponse() (LoadWeightsResponse, error)
- func (t RetrieveFuture200JSONResponseBody) AsOptimStepResponse() (OptimStepResponse, error)
- func (t RetrieveFuture200JSONResponseBody) AsSaveWeightsForSamplerResponse() (SaveWeightsForSamplerResponse, error)
- func (t RetrieveFuture200JSONResponseBody) AsSaveWeightsResponse() (SaveWeightsResponse, error)
- func (t RetrieveFuture200JSONResponseBody) AsTryAgainResponse() (TryAgainResponse, error)
- func (t RetrieveFuture200JSONResponseBody) AsUnloadModelResponse() (UnloadModelResponse, error)
- func (t *RetrieveFuture200JSONResponseBody) FromCreateModelResponse(v CreateModelResponse) error
- func (t *RetrieveFuture200JSONResponseBody) FromForwardBackwardOutput(v ForwardBackwardOutput) error
- func (t *RetrieveFuture200JSONResponseBody) FromLoadWeightsResponse(v LoadWeightsResponse) error
- func (t *RetrieveFuture200JSONResponseBody) FromOptimStepResponse(v OptimStepResponse) error
- func (t *RetrieveFuture200JSONResponseBody) FromSaveWeightsForSamplerResponse(v SaveWeightsForSamplerResponse) error
- func (t *RetrieveFuture200JSONResponseBody) FromSaveWeightsResponse(v SaveWeightsResponse) error
- func (t *RetrieveFuture200JSONResponseBody) FromTryAgainResponse(v TryAgainResponse) error
- func (t *RetrieveFuture200JSONResponseBody) FromUnloadModelResponse(v UnloadModelResponse) error
- func (t RetrieveFuture200JSONResponseBody) MarshalJSON() ([]byte, error)
- func (t *RetrieveFuture200JSONResponseBody) MergeCreateModelResponse(v CreateModelResponse) error
- func (t *RetrieveFuture200JSONResponseBody) MergeForwardBackwardOutput(v ForwardBackwardOutput) error
- func (t *RetrieveFuture200JSONResponseBody) MergeLoadWeightsResponse(v LoadWeightsResponse) error
- func (t *RetrieveFuture200JSONResponseBody) MergeOptimStepResponse(v OptimStepResponse) error
- func (t *RetrieveFuture200JSONResponseBody) MergeSaveWeightsForSamplerResponse(v SaveWeightsForSamplerResponse) error
- func (t *RetrieveFuture200JSONResponseBody) MergeSaveWeightsResponse(v SaveWeightsResponse) error
- func (t *RetrieveFuture200JSONResponseBody) MergeTryAgainResponse(v TryAgainResponse) error
- func (t *RetrieveFuture200JSONResponseBody) MergeUnloadModelResponse(v UnloadModelResponse) error
- func (t *RetrieveFuture200JSONResponseBody) UnmarshalJSON(b []byte) error
- type RetrieveFutureHTTPResponse
- func (r RetrieveFutureHTTPResponse) ContentType() string
- func (r RetrieveFutureHTTPResponse) GetBody() []byte
- func (r RetrieveFutureHTTPResponse) GetJSON200() *RetrieveFuture200JSONResponseBody
- func (r RetrieveFutureHTTPResponse) GetJSON400() *ErrorResponse
- func (r RetrieveFutureHTTPResponse) GetJSON404() *ErrorResponse
- func (r RetrieveFutureHTTPResponse) GetJSON408() *TryAgainResponse
- func (r RetrieveFutureHTTPResponse) Status() string
- func (r RetrieveFutureHTTPResponse) StatusCode() int
- type RetrieveFutureJSONRequestBody
- type SampleHTTPResponse
- type SampleJSONRequestBody
- type SampleRequest
- type SampleRequestType
- type SampleResponse
- type SampleResponseType
- type SampledSequence
- type SamplingParams
- type SamplingParamsStop0
- type SamplingParamsStop1
- type SamplingParamsStop2
- type SamplingParams_Stop
- func (t SamplingParams_Stop) AsSamplingParamsStop0() (SamplingParamsStop0, error)
- func (t SamplingParams_Stop) AsSamplingParamsStop1() (SamplingParamsStop1, error)
- func (t SamplingParams_Stop) AsSamplingParamsStop2() (SamplingParamsStop2, error)
- func (t *SamplingParams_Stop) FromSamplingParamsStop0(v SamplingParamsStop0) error
- func (t *SamplingParams_Stop) FromSamplingParamsStop1(v SamplingParamsStop1) error
- func (t *SamplingParams_Stop) FromSamplingParamsStop2(v SamplingParamsStop2) error
- func (t SamplingParams_Stop) MarshalJSON() ([]byte, error)
- func (t *SamplingParams_Stop) MergeSamplingParamsStop0(v SamplingParamsStop0) error
- func (t *SamplingParams_Stop) MergeSamplingParamsStop1(v SamplingParamsStop1) error
- func (t *SamplingParams_Stop) MergeSamplingParamsStop2(v SamplingParamsStop2) error
- func (t *SamplingParams_Stop) UnmarshalJSON(b []byte) error
- type SaveWeightsForSamplerHTTPResponse
- func (r SaveWeightsForSamplerHTTPResponse) ContentType() string
- func (r SaveWeightsForSamplerHTTPResponse) GetBody() []byte
- func (r SaveWeightsForSamplerHTTPResponse) GetJSON200() *UntypedAPIFuture
- func (r SaveWeightsForSamplerHTTPResponse) Status() string
- func (r SaveWeightsForSamplerHTTPResponse) StatusCode() int
- type SaveWeightsForSamplerJSONRequestBody
- type SaveWeightsForSamplerRequest
- type SaveWeightsForSamplerRequestType
- type SaveWeightsForSamplerResponse
- type SaveWeightsForSamplerResponseType
- type SaveWeightsHTTPResponse
- type SaveWeightsJSONRequestBody
- type SaveWeightsRequest
- type SaveWeightsRequestType
- type SaveWeightsResponse
- type SaveWeightsResponseType
- type SessionEndEvent
- type SessionStartEvent
- type Severity
- type StopReason
- type TelemetryBatch
- type TelemetryEvent
- func (t TelemetryEvent) AsSessionEndEvent() (SessionEndEvent, error)
- func (t TelemetryEvent) AsSessionStartEvent() (SessionStartEvent, error)
- func (t TelemetryEvent) AsUnhandledExceptionEvent() (UnhandledExceptionEvent, error)
- func (t TelemetryEvent) Discriminator() (string, error)
- func (t *TelemetryEvent) FromSessionEndEvent(v SessionEndEvent) error
- func (t *TelemetryEvent) FromSessionStartEvent(v SessionStartEvent) error
- func (t *TelemetryEvent) FromUnhandledExceptionEvent(v UnhandledExceptionEvent) error
- func (t TelemetryEvent) MarshalJSON() ([]byte, error)
- func (t *TelemetryEvent) MergeSessionEndEvent(v SessionEndEvent) error
- func (t *TelemetryEvent) MergeSessionStartEvent(v SessionStartEvent) error
- func (t *TelemetryEvent) MergeUnhandledExceptionEvent(v UnhandledExceptionEvent) error
- func (t *TelemetryEvent) UnmarshalJSON(b []byte) error
- func (t TelemetryEvent) ValueByDiscriminator() (interface{}, error)
- type TelemetryResponse
- type TelemetryResponseStatus
- type TensorDType
- type TensorData
- type TensorDataData0
- type TensorDataData1
- type TensorData_Data
- func (t TensorData_Data) AsTensorDataData0() (TensorDataData0, error)
- func (t TensorData_Data) AsTensorDataData1() (TensorDataData1, error)
- func (t *TensorData_Data) FromTensorDataData0(v TensorDataData0) error
- func (t *TensorData_Data) FromTensorDataData1(v TensorDataData1) error
- func (t TensorData_Data) MarshalJSON() ([]byte, error)
- func (t *TensorData_Data) MergeTensorDataData0(v TensorDataData0) error
- func (t *TensorData_Data) MergeTensorDataData1(v TensorDataData1) error
- func (t *TensorData_Data) UnmarshalJSON(b []byte) error
- type TinkerSamplerWeightsPath
- type TinkerWeightsLabel
- type TinkerWeightsPath
- type TryAgainResponse
- type TryAgainResponseType
- type UnhandledExceptionEvent
- type UnloadModelHTTPResponse
- type UnloadModelJSONRequestBody
- type UnloadModelRequest
- type UnloadModelRequestType
- type UnloadModelResponse
- type UnloadModelResponseType
- type UntypedAPIFuture
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAsampleRequest ¶
func NewAsampleRequest(server string, body AsampleJSONRequestBody) (*http.Request, error)
NewAsampleRequest calls the generic Asample builder with application/json body
func NewAsampleRequestWithBody ¶
func NewAsampleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewAsampleRequestWithBody constructs an http.Request for the Asample method, with any body, and a specified content type
func NewCreateModelRequest ¶
func NewCreateModelRequest(server string, body CreateModelJSONRequestBody) (*http.Request, error)
NewCreateModelRequest calls the generic CreateModel builder with application/json body
func NewCreateModelRequestWithBody ¶
func NewCreateModelRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateModelRequestWithBody constructs an http.Request for the CreateModel method, with any body, and a specified content type
func NewForwardBackwardRequest ¶
func NewForwardBackwardRequest(server string, body ForwardBackwardJSONRequestBody) (*http.Request, error)
NewForwardBackwardRequest calls the generic ForwardBackward builder with application/json body
func NewForwardBackwardRequestWithBody ¶
func NewForwardBackwardRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewForwardBackwardRequestWithBody constructs an http.Request for the ForwardBackward method, with any body, and a specified content type
func NewForwardRequest ¶
func NewForwardRequest(server string, body ForwardJSONRequestBody) (*http.Request, error)
NewForwardRequest calls the generic Forward builder with application/json body
func NewForwardRequestWithBody ¶
func NewForwardRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewForwardRequestWithBody constructs an http.Request for the Forward method, with any body, and a specified content type
func NewGetInfoRequest ¶
func NewGetInfoRequest(server string, body GetInfoJSONRequestBody) (*http.Request, error)
NewGetInfoRequest calls the generic GetInfo builder with application/json body
func NewGetInfoRequestWithBody ¶
func NewGetInfoRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewGetInfoRequestWithBody constructs an http.Request for the GetInfo method, with any body, and a specified content type
func NewGetServerCapabilitiesRequest ¶
NewGetServerCapabilitiesRequest constructs an http.Request for the GetServerCapabilities method
func NewHealthCheckRequest ¶
NewHealthCheckRequest constructs an http.Request for the HealthCheck method
func NewLoadWeightsRequest ¶
func NewLoadWeightsRequest(server string, body LoadWeightsJSONRequestBody) (*http.Request, error)
NewLoadWeightsRequest calls the generic LoadWeights builder with application/json body
func NewLoadWeightsRequestWithBody ¶
func NewLoadWeightsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewLoadWeightsRequestWithBody constructs an http.Request for the LoadWeights method, with any body, and a specified content type
func NewOptimStepRequest ¶
func NewOptimStepRequest(server string, body OptimStepJSONRequestBody) (*http.Request, error)
NewOptimStepRequest calls the generic OptimStep builder with application/json body
func NewOptimStepRequestWithBody ¶
func NewOptimStepRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewOptimStepRequestWithBody constructs an http.Request for the OptimStep method, with any body, and a specified content type
func NewReceiveTelemetryRequest ¶
func NewReceiveTelemetryRequest(server string, body ReceiveTelemetryJSONRequestBody) (*http.Request, error)
NewReceiveTelemetryRequest calls the generic ReceiveTelemetry builder with application/json body
func NewReceiveTelemetryRequestWithBody ¶
func NewReceiveTelemetryRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewReceiveTelemetryRequestWithBody constructs an http.Request for the ReceiveTelemetry method, with any body, and a specified content type
func NewRetrieveFutureRequest ¶
func NewRetrieveFutureRequest(server string, body RetrieveFutureJSONRequestBody) (*http.Request, error)
NewRetrieveFutureRequest calls the generic RetrieveFuture builder with application/json body
func NewRetrieveFutureRequestWithBody ¶
func NewRetrieveFutureRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewRetrieveFutureRequestWithBody constructs an http.Request for the RetrieveFuture method, with any body, and a specified content type
func NewSampleRequest ¶
func NewSampleRequest(server string, body SampleJSONRequestBody) (*http.Request, error)
NewSampleRequest calls the generic Sample builder with application/json body
func NewSampleRequestWithBody ¶
func NewSampleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewSampleRequestWithBody constructs an http.Request for the Sample method, with any body, and a specified content type
func NewSaveWeightsForSamplerRequest ¶
func NewSaveWeightsForSamplerRequest(server string, body SaveWeightsForSamplerJSONRequestBody) (*http.Request, error)
NewSaveWeightsForSamplerRequest calls the generic SaveWeightsForSampler builder with application/json body
func NewSaveWeightsForSamplerRequestWithBody ¶
func NewSaveWeightsForSamplerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewSaveWeightsForSamplerRequestWithBody constructs an http.Request for the SaveWeightsForSampler method, with any body, and a specified content type
func NewSaveWeightsRequest ¶
func NewSaveWeightsRequest(server string, body SaveWeightsJSONRequestBody) (*http.Request, error)
NewSaveWeightsRequest calls the generic SaveWeights builder with application/json body
func NewSaveWeightsRequestWithBody ¶
func NewSaveWeightsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewSaveWeightsRequestWithBody constructs an http.Request for the SaveWeights method, with any body, and a specified content type
func NewUnloadModelRequest ¶
func NewUnloadModelRequest(server string, body UnloadModelJSONRequestBody) (*http.Request, error)
NewUnloadModelRequest calls the generic UnloadModel builder with application/json body
Types ¶
type AdamParams ¶
type AdamParams struct {
// Beta1 Coefficient used for computing running averages of gradient
Beta1 *float64 `json:"beta1,omitempty"`
// Beta2 Coefficient used for computing running averages of gradient square
Beta2 *float64 `json:"beta2,omitempty"`
// Eps Term added to the denominator to improve numerical stability
Eps *float64 `json:"eps,omitempty"`
// LearningRate Learning rate for the optimizer
LearningRate float64 `json:"learning_rate"`
}
AdamParams defines model for AdamParams.
type AsampleHTTPResponse ¶
type AsampleHTTPResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *UntypedAPIFuture
}
func ParseAsampleHTTPResponse ¶
func ParseAsampleHTTPResponse(rsp *http.Response) (*AsampleHTTPResponse, error)
ParseAsampleHTTPResponse parses an HTTP response from a AsampleWithResponse call
func (AsampleHTTPResponse) ContentType ¶
func (r AsampleHTTPResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (AsampleHTTPResponse) GetBody ¶
func (r AsampleHTTPResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (AsampleHTTPResponse) GetJSON200 ¶
func (r AsampleHTTPResponse) GetJSON200() *UntypedAPIFuture
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (AsampleHTTPResponse) Status ¶
func (r AsampleHTTPResponse) Status() string
Status returns HTTPResponse.Status
func (AsampleHTTPResponse) StatusCode ¶
func (r AsampleHTTPResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AsampleJSONRequestBody ¶
type AsampleJSONRequestBody = SampleRequest
AsampleJSONRequestBody defines body for Asample for application/json ContentType.
type Client ¶
type Client struct {
// 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.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) Asample ¶
func (c *Client) Asample(ctx context.Context, body AsampleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
Asample Sample from a base model with your LoRA weights
Generates samples from the model using the specified sampling parameters.
Takes a body of the `application/json` content type.
Corresponds with POST /api/v1/asample (the `Asample` operationId).
func (*Client) AsampleWithBody ¶
func (c *Client) AsampleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
AsampleWithBody Sample from a base model with your LoRA weights
Generates samples from the model using the specified sampling parameters.
Takes any type of body and a specified content type.
Corresponds with POST /api/v1/asample (the `Asample` operationId).
func (*Client) CreateModel ¶
func (c *Client) CreateModel(ctx context.Context, body CreateModelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateModel Creates a new model
Creates a new model. Pass a LoRA config to create a new LoRA adapter for the base model.
Takes a body of the `application/json` content type.
Corresponds with POST /api/v1/create_model (the `CreateModel` operationId).
func (*Client) CreateModelWithBody ¶
func (c *Client) CreateModelWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateModelWithBody Creates a new model
Creates a new model. Pass a LoRA config to create a new LoRA adapter for the base model.
Takes any type of body and a specified content type.
Corresponds with POST /api/v1/create_model (the `CreateModel` operationId).
func (*Client) Forward ¶
func (c *Client) Forward(ctx context.Context, body ForwardJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
Forward Forward pass
Performs a forward pass through the model.
Takes a body of the `application/json` content type.
Corresponds with POST /api/v1/forward (the `Forward` operationId).
func (*Client) ForwardBackward ¶
func (c *Client) ForwardBackward(ctx context.Context, body ForwardBackwardJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
ForwardBackward Forward and backward pass
Performs a forward and backward pass through the model.
Takes a body of the `application/json` content type.
Corresponds with POST /api/v1/forward_backward (the `ForwardBackward` operationId).
func (*Client) ForwardBackwardWithBody ¶
func (c *Client) ForwardBackwardWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ForwardBackwardWithBody Forward and backward pass
Performs a forward and backward pass through the model.
Takes any type of body and a specified content type.
Corresponds with POST /api/v1/forward_backward (the `ForwardBackward` operationId).
func (*Client) ForwardWithBody ¶
func (c *Client) ForwardWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ForwardWithBody Forward pass
Performs a forward pass through the model.
Takes any type of body and a specified content type.
Corresponds with POST /api/v1/forward (the `Forward` operationId).
func (*Client) GetInfo ¶
func (c *Client) GetInfo(ctx context.Context, body GetInfoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
GetInfo Get model information
Retrieves information about the current model.
Takes a body of the `application/json` content type.
Corresponds with POST /api/v1/get_info (the `GetInfo` operationId).
func (*Client) GetInfoWithBody ¶
func (c *Client) GetInfoWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
GetInfoWithBody Get model information
Retrieves information about the current model.
Takes any type of body and a specified content type.
Corresponds with POST /api/v1/get_info (the `GetInfo` operationId).
func (*Client) GetServerCapabilities ¶
func (c *Client) GetServerCapabilities(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetServerCapabilities Get server capabilities
Retrieves information about supported models and server capabilities.
Corresponds with GET /api/v1/get_server_capabilities (the `GetServerCapabilities` operationId).
func (*Client) HealthCheck ¶
func (c *Client) HealthCheck(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
HealthCheck Health check
Checks if the API server is ready.
Corresponds with GET /api/v1/healthz (the `HealthCheck` operationId).
func (*Client) LoadWeights ¶
func (c *Client) LoadWeights(ctx context.Context, body LoadWeightsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
LoadWeights Load model weights
Loads model weights from disk.
Takes a body of the `application/json` content type.
Corresponds with POST /api/v1/load_weights (the `LoadWeights` operationId).
func (*Client) LoadWeightsWithBody ¶
func (c *Client) LoadWeightsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
LoadWeightsWithBody Load model weights
Loads model weights from disk.
Takes any type of body and a specified content type.
Corresponds with POST /api/v1/load_weights (the `LoadWeights` operationId).
func (*Client) OptimStep ¶
func (c *Client) OptimStep(ctx context.Context, body OptimStepJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
OptimStep Optimization step
Performs an optimization step using AdamW optimizer.
Takes a body of the `application/json` content type.
Corresponds with POST /api/v1/optim_step (the `OptimStep` operationId).
func (*Client) OptimStepWithBody ¶
func (c *Client) OptimStepWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
OptimStepWithBody Optimization step
Performs an optimization step using AdamW optimizer.
Takes any type of body and a specified content type.
Corresponds with POST /api/v1/optim_step (the `OptimStep` operationId).
func (*Client) ReceiveTelemetry ¶
func (c *Client) ReceiveTelemetry(ctx context.Context, body ReceiveTelemetryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
ReceiveTelemetry Receive client telemetry
Accepts batches of SDK telemetry events for analytics and diagnostics.
Takes a body of the `application/json` content type.
Corresponds with POST /api/v1/telemetry (the `ReceiveTelemetry` operationId).
func (*Client) ReceiveTelemetryWithBody ¶
func (c *Client) ReceiveTelemetryWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ReceiveTelemetryWithBody Receive client telemetry
Accepts batches of SDK telemetry events for analytics and diagnostics.
Takes any type of body and a specified content type.
Corresponds with POST /api/v1/telemetry (the `ReceiveTelemetry` operationId).
func (*Client) RetrieveFuture ¶
func (c *Client) RetrieveFuture(ctx context.Context, body RetrieveFutureJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
RetrieveFuture Retrieve future result
Retrieves the result of a future by its ID.
Takes a body of the `application/json` content type.
Corresponds with POST /api/v1/retrieve_future (the `RetrieveFuture` operationId).
func (*Client) RetrieveFutureWithBody ¶
func (c *Client) RetrieveFutureWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
RetrieveFutureWithBody Retrieve future result
Retrieves the result of a future by its ID.
Takes any type of body and a specified content type.
Corresponds with POST /api/v1/retrieve_future (the `RetrieveFuture` operationId).
func (*Client) Sample ¶
func (c *Client) Sample(ctx context.Context, body SampleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
Sample Sample from a base model with your LoRA weights
Generates samples from the model using the specified sampling parameters.
Takes a body of the `application/json` content type.
Corresponds with POST /api/v1/sample (the `Sample` operationId).
func (*Client) SampleWithBody ¶
func (c *Client) SampleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
SampleWithBody Sample from a base model with your LoRA weights
Generates samples from the model using the specified sampling parameters.
Takes any type of body and a specified content type.
Corresponds with POST /api/v1/sample (the `Sample` operationId).
func (*Client) SaveWeights ¶
func (c *Client) SaveWeights(ctx context.Context, body SaveWeightsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
SaveWeights Save model weights
Saves the current model weights to disk.
Takes a body of the `application/json` content type.
Corresponds with POST /api/v1/save_weights (the `SaveWeights` operationId).
func (*Client) SaveWeightsForSampler ¶
func (c *Client) SaveWeightsForSampler(ctx context.Context, body SaveWeightsForSamplerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
SaveWeightsForSampler Save weights for sampler
Saves weights in a format compatible with sampling/inference servers.
Takes a body of the `application/json` content type.
Corresponds with POST /api/v1/save_weights_for_sampler (the `SaveWeightsForSampler` operationId).
func (*Client) SaveWeightsForSamplerWithBody ¶
func (c *Client) SaveWeightsForSamplerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
SaveWeightsForSamplerWithBody Save weights for sampler
Saves weights in a format compatible with sampling/inference servers.
Takes any type of body and a specified content type.
Corresponds with POST /api/v1/save_weights_for_sampler (the `SaveWeightsForSampler` operationId).
func (*Client) SaveWeightsWithBody ¶
func (c *Client) SaveWeightsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
SaveWeightsWithBody Save model weights
Saves the current model weights to disk.
Takes any type of body and a specified content type.
Corresponds with POST /api/v1/save_weights (the `SaveWeights` operationId).
func (*Client) UnloadModel ¶
func (c *Client) UnloadModel(ctx context.Context, body UnloadModelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
UnloadModel Unload the model's weights from GPUs. Optional, but hints that the user is done using the model for now; allows Tinker servers to free resources.
Unload the model weights and ends the user's session.
Takes a body of the `application/json` content type.
Corresponds with POST /api/v1/unload_model (the `UnloadModel` operationId).
func (*Client) UnloadModelWithBody ¶
func (c *Client) UnloadModelWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UnloadModelWithBody Unload the model's weights from GPUs. Optional, but hints that the user is done using the model for now; allows Tinker servers to free resources.
Unload the model weights and ends the user's session.
Takes any type of body and a specified content type.
Corresponds with POST /api/v1/unload_model (the `UnloadModel` operationId).
type ClientInterface ¶
type ClientInterface interface {
// AsampleWithBody Sample from a base model with your LoRA weights
//
// Generates samples from the model using the specified sampling parameters.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /api/v1/asample (the `Asample` operationId).
AsampleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// Asample Sample from a base model with your LoRA weights
//
// Generates samples from the model using the specified sampling parameters.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /api/v1/asample (the `Asample` operationId).
Asample(ctx context.Context, body AsampleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateModelWithBody Creates a new model
//
// Creates a new model. Pass a LoRA config to create a new LoRA adapter for the base model.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /api/v1/create_model (the `CreateModel` operationId).
CreateModelWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateModel Creates a new model
//
// Creates a new model. Pass a LoRA config to create a new LoRA adapter for the base model.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /api/v1/create_model (the `CreateModel` operationId).
CreateModel(ctx context.Context, body CreateModelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ForwardWithBody Forward pass
//
// Performs a forward pass through the model.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /api/v1/forward (the `Forward` operationId).
ForwardWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// Forward Forward pass
//
// Performs a forward pass through the model.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /api/v1/forward (the `Forward` operationId).
Forward(ctx context.Context, body ForwardJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ForwardBackwardWithBody Forward and backward pass
//
// Performs a forward and backward pass through the model.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /api/v1/forward_backward (the `ForwardBackward` operationId).
ForwardBackwardWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// ForwardBackward Forward and backward pass
//
// Performs a forward and backward pass through the model.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /api/v1/forward_backward (the `ForwardBackward` operationId).
ForwardBackward(ctx context.Context, body ForwardBackwardJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetInfoWithBody Get model information
//
// Retrieves information about the current model.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /api/v1/get_info (the `GetInfo` operationId).
GetInfoWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetInfo Get model information
//
// Retrieves information about the current model.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /api/v1/get_info (the `GetInfo` operationId).
GetInfo(ctx context.Context, body GetInfoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetServerCapabilities Get server capabilities
//
// Retrieves information about supported models and server capabilities.
//
// Corresponds with GET /api/v1/get_server_capabilities (the `GetServerCapabilities` operationId).
GetServerCapabilities(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// HealthCheck Health check
//
// Checks if the API server is ready.
//
// Corresponds with GET /api/v1/healthz (the `HealthCheck` operationId).
HealthCheck(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// LoadWeightsWithBody Load model weights
//
// Loads model weights from disk.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /api/v1/load_weights (the `LoadWeights` operationId).
LoadWeightsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// LoadWeights Load model weights
//
// Loads model weights from disk.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /api/v1/load_weights (the `LoadWeights` operationId).
LoadWeights(ctx context.Context, body LoadWeightsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// OptimStepWithBody Optimization step
//
// Performs an optimization step using AdamW optimizer.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /api/v1/optim_step (the `OptimStep` operationId).
OptimStepWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// OptimStep Optimization step
//
// Performs an optimization step using AdamW optimizer.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /api/v1/optim_step (the `OptimStep` operationId).
OptimStep(ctx context.Context, body OptimStepJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// RetrieveFutureWithBody Retrieve future result
//
// Retrieves the result of a future by its ID.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /api/v1/retrieve_future (the `RetrieveFuture` operationId).
RetrieveFutureWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// RetrieveFuture Retrieve future result
//
// Retrieves the result of a future by its ID.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /api/v1/retrieve_future (the `RetrieveFuture` operationId).
RetrieveFuture(ctx context.Context, body RetrieveFutureJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// SampleWithBody Sample from a base model with your LoRA weights
//
// Generates samples from the model using the specified sampling parameters.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /api/v1/sample (the `Sample` operationId).
SampleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// Sample Sample from a base model with your LoRA weights
//
// Generates samples from the model using the specified sampling parameters.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /api/v1/sample (the `Sample` operationId).
Sample(ctx context.Context, body SampleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// SaveWeightsWithBody Save model weights
//
// Saves the current model weights to disk.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /api/v1/save_weights (the `SaveWeights` operationId).
SaveWeightsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// SaveWeights Save model weights
//
// Saves the current model weights to disk.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /api/v1/save_weights (the `SaveWeights` operationId).
SaveWeights(ctx context.Context, body SaveWeightsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// SaveWeightsForSamplerWithBody Save weights for sampler
//
// Saves weights in a format compatible with sampling/inference servers.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /api/v1/save_weights_for_sampler (the `SaveWeightsForSampler` operationId).
SaveWeightsForSamplerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// SaveWeightsForSampler Save weights for sampler
//
// Saves weights in a format compatible with sampling/inference servers.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /api/v1/save_weights_for_sampler (the `SaveWeightsForSampler` operationId).
SaveWeightsForSampler(ctx context.Context, body SaveWeightsForSamplerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ReceiveTelemetryWithBody Receive client telemetry
//
// Accepts batches of SDK telemetry events for analytics and diagnostics.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /api/v1/telemetry (the `ReceiveTelemetry` operationId).
ReceiveTelemetryWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// ReceiveTelemetry Receive client telemetry
//
// Accepts batches of SDK telemetry events for analytics and diagnostics.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /api/v1/telemetry (the `ReceiveTelemetry` operationId).
ReceiveTelemetry(ctx context.Context, body ReceiveTelemetryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// UnloadModelWithBody Unload the model's weights from GPUs. Optional, but hints that the user is done using the model for now; allows Tinker servers to free resources.
//
// Unload the model weights and ends the user's session.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /api/v1/unload_model (the `UnloadModel` operationId).
UnloadModelWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// UnloadModel Unload the model's weights from GPUs. Optional, but hints that the user is done using the model for now; allows Tinker servers to free resources.
//
// Unload the model weights and ends the user's session.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /api/v1/unload_model (the `UnloadModel` operationId).
UnloadModel(ctx context.Context, body UnloadModelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) AsampleWithBodyWithResponse ¶
func (c *ClientWithResponses) AsampleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AsampleHTTPResponse, error)
AsampleWithBodyWithResponse Sample from a base model with your LoRA weights
Generates samples from the model using the specified sampling parameters.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/asample (the `Asample` operationId).
func (*ClientWithResponses) AsampleWithResponse ¶
func (c *ClientWithResponses) AsampleWithResponse(ctx context.Context, body AsampleJSONRequestBody, reqEditors ...RequestEditorFn) (*AsampleHTTPResponse, error)
AsampleWithResponse Sample from a base model with your LoRA weights
Generates samples from the model using the specified sampling parameters.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/asample (the `Asample` operationId).
func (*ClientWithResponses) CreateModelWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateModelWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateModelHTTPResponse, error)
CreateModelWithBodyWithResponse Creates a new model
Creates a new model. Pass a LoRA config to create a new LoRA adapter for the base model.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/create_model (the `CreateModel` operationId).
func (*ClientWithResponses) CreateModelWithResponse ¶
func (c *ClientWithResponses) CreateModelWithResponse(ctx context.Context, body CreateModelJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateModelHTTPResponse, error)
CreateModelWithResponse Creates a new model
Creates a new model. Pass a LoRA config to create a new LoRA adapter for the base model.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/create_model (the `CreateModel` operationId).
func (*ClientWithResponses) ForwardBackwardWithBodyWithResponse ¶
func (c *ClientWithResponses) ForwardBackwardWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ForwardBackwardHTTPResponse, error)
ForwardBackwardWithBodyWithResponse Forward and backward pass
Performs a forward and backward pass through the model.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/forward_backward (the `ForwardBackward` operationId).
func (*ClientWithResponses) ForwardBackwardWithResponse ¶
func (c *ClientWithResponses) ForwardBackwardWithResponse(ctx context.Context, body ForwardBackwardJSONRequestBody, reqEditors ...RequestEditorFn) (*ForwardBackwardHTTPResponse, error)
ForwardBackwardWithResponse Forward and backward pass
Performs a forward and backward pass through the model.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/forward_backward (the `ForwardBackward` operationId).
func (*ClientWithResponses) ForwardWithBodyWithResponse ¶
func (c *ClientWithResponses) ForwardWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ForwardHTTPResponse, error)
ForwardWithBodyWithResponse Forward pass
Performs a forward pass through the model.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/forward (the `Forward` operationId).
func (*ClientWithResponses) ForwardWithResponse ¶
func (c *ClientWithResponses) ForwardWithResponse(ctx context.Context, body ForwardJSONRequestBody, reqEditors ...RequestEditorFn) (*ForwardHTTPResponse, error)
ForwardWithResponse Forward pass
Performs a forward pass through the model.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/forward (the `Forward` operationId).
func (*ClientWithResponses) GetInfoWithBodyWithResponse ¶
func (c *ClientWithResponses) GetInfoWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetInfoHTTPResponse, error)
GetInfoWithBodyWithResponse Get model information
Retrieves information about the current model.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/get_info (the `GetInfo` operationId).
func (*ClientWithResponses) GetInfoWithResponse ¶
func (c *ClientWithResponses) GetInfoWithResponse(ctx context.Context, body GetInfoJSONRequestBody, reqEditors ...RequestEditorFn) (*GetInfoHTTPResponse, error)
GetInfoWithResponse Get model information
Retrieves information about the current model.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/get_info (the `GetInfo` operationId).
func (*ClientWithResponses) GetServerCapabilitiesWithResponse ¶
func (c *ClientWithResponses) GetServerCapabilitiesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetServerCapabilitiesHTTPResponse, error)
GetServerCapabilitiesWithResponse Get server capabilities
Retrieves information about supported models and server capabilities.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /api/v1/get_server_capabilities (the `GetServerCapabilities` operationId).
func (*ClientWithResponses) HealthCheckWithResponse ¶
func (c *ClientWithResponses) HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckHTTPResponse, error)
HealthCheckWithResponse Health check
Checks if the API server is ready.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /api/v1/healthz (the `HealthCheck` operationId).
func (*ClientWithResponses) LoadWeightsWithBodyWithResponse ¶
func (c *ClientWithResponses) LoadWeightsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoadWeightsHTTPResponse, error)
LoadWeightsWithBodyWithResponse Load model weights
Loads model weights from disk.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/load_weights (the `LoadWeights` operationId).
func (*ClientWithResponses) LoadWeightsWithResponse ¶
func (c *ClientWithResponses) LoadWeightsWithResponse(ctx context.Context, body LoadWeightsJSONRequestBody, reqEditors ...RequestEditorFn) (*LoadWeightsHTTPResponse, error)
LoadWeightsWithResponse Load model weights
Loads model weights from disk.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/load_weights (the `LoadWeights` operationId).
func (*ClientWithResponses) OptimStepWithBodyWithResponse ¶
func (c *ClientWithResponses) OptimStepWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*OptimStepHTTPResponse, error)
OptimStepWithBodyWithResponse Optimization step
Performs an optimization step using AdamW optimizer.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/optim_step (the `OptimStep` operationId).
func (*ClientWithResponses) OptimStepWithResponse ¶
func (c *ClientWithResponses) OptimStepWithResponse(ctx context.Context, body OptimStepJSONRequestBody, reqEditors ...RequestEditorFn) (*OptimStepHTTPResponse, error)
OptimStepWithResponse Optimization step
Performs an optimization step using AdamW optimizer.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/optim_step (the `OptimStep` operationId).
func (*ClientWithResponses) ReceiveTelemetryWithBodyWithResponse ¶
func (c *ClientWithResponses) ReceiveTelemetryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReceiveTelemetryHTTPResponse, error)
ReceiveTelemetryWithBodyWithResponse Receive client telemetry
Accepts batches of SDK telemetry events for analytics and diagnostics.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/telemetry (the `ReceiveTelemetry` operationId).
func (*ClientWithResponses) ReceiveTelemetryWithResponse ¶
func (c *ClientWithResponses) ReceiveTelemetryWithResponse(ctx context.Context, body ReceiveTelemetryJSONRequestBody, reqEditors ...RequestEditorFn) (*ReceiveTelemetryHTTPResponse, error)
ReceiveTelemetryWithResponse Receive client telemetry
Accepts batches of SDK telemetry events for analytics and diagnostics.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/telemetry (the `ReceiveTelemetry` operationId).
func (*ClientWithResponses) RetrieveFutureWithBodyWithResponse ¶
func (c *ClientWithResponses) RetrieveFutureWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RetrieveFutureHTTPResponse, error)
RetrieveFutureWithBodyWithResponse Retrieve future result
Retrieves the result of a future by its ID.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/retrieve_future (the `RetrieveFuture` operationId).
func (*ClientWithResponses) RetrieveFutureWithResponse ¶
func (c *ClientWithResponses) RetrieveFutureWithResponse(ctx context.Context, body RetrieveFutureJSONRequestBody, reqEditors ...RequestEditorFn) (*RetrieveFutureHTTPResponse, error)
RetrieveFutureWithResponse Retrieve future result
Retrieves the result of a future by its ID.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/retrieve_future (the `RetrieveFuture` operationId).
func (*ClientWithResponses) SampleWithBodyWithResponse ¶
func (c *ClientWithResponses) SampleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SampleHTTPResponse, error)
SampleWithBodyWithResponse Sample from a base model with your LoRA weights
Generates samples from the model using the specified sampling parameters.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/sample (the `Sample` operationId).
func (*ClientWithResponses) SampleWithResponse ¶
func (c *ClientWithResponses) SampleWithResponse(ctx context.Context, body SampleJSONRequestBody, reqEditors ...RequestEditorFn) (*SampleHTTPResponse, error)
SampleWithResponse Sample from a base model with your LoRA weights
Generates samples from the model using the specified sampling parameters.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/sample (the `Sample` operationId).
func (*ClientWithResponses) SaveWeightsForSamplerWithBodyWithResponse ¶
func (c *ClientWithResponses) SaveWeightsForSamplerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SaveWeightsForSamplerHTTPResponse, error)
SaveWeightsForSamplerWithBodyWithResponse Save weights for sampler
Saves weights in a format compatible with sampling/inference servers.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/save_weights_for_sampler (the `SaveWeightsForSampler` operationId).
func (*ClientWithResponses) SaveWeightsForSamplerWithResponse ¶
func (c *ClientWithResponses) SaveWeightsForSamplerWithResponse(ctx context.Context, body SaveWeightsForSamplerJSONRequestBody, reqEditors ...RequestEditorFn) (*SaveWeightsForSamplerHTTPResponse, error)
SaveWeightsForSamplerWithResponse Save weights for sampler
Saves weights in a format compatible with sampling/inference servers.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/save_weights_for_sampler (the `SaveWeightsForSampler` operationId).
func (*ClientWithResponses) SaveWeightsWithBodyWithResponse ¶
func (c *ClientWithResponses) SaveWeightsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SaveWeightsHTTPResponse, error)
SaveWeightsWithBodyWithResponse Save model weights
Saves the current model weights to disk.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/save_weights (the `SaveWeights` operationId).
func (*ClientWithResponses) SaveWeightsWithResponse ¶
func (c *ClientWithResponses) SaveWeightsWithResponse(ctx context.Context, body SaveWeightsJSONRequestBody, reqEditors ...RequestEditorFn) (*SaveWeightsHTTPResponse, error)
SaveWeightsWithResponse Save model weights
Saves the current model weights to disk.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/save_weights (the `SaveWeights` operationId).
func (*ClientWithResponses) UnloadModelWithBodyWithResponse ¶
func (c *ClientWithResponses) UnloadModelWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UnloadModelHTTPResponse, error)
UnloadModelWithBodyWithResponse Unload the model's weights from GPUs. Optional, but hints that the user is done using the model for now; allows Tinker servers to free resources.
Unload the model weights and ends the user's session.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/unload_model (the `UnloadModel` operationId).
func (*ClientWithResponses) UnloadModelWithResponse ¶
func (c *ClientWithResponses) UnloadModelWithResponse(ctx context.Context, body UnloadModelJSONRequestBody, reqEditors ...RequestEditorFn) (*UnloadModelHTTPResponse, error)
UnloadModelWithResponse Unload the model's weights from GPUs. Optional, but hints that the user is done using the model for now; allows Tinker servers to free resources.
Unload the model weights and ends the user's session.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/unload_model (the `UnloadModel` operationId).
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// AsampleWithBodyWithResponse Sample from a base model with your LoRA weights
//
// Generates samples from the model using the specified sampling parameters.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/asample (the `Asample` operationId).
AsampleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AsampleHTTPResponse, error)
// AsampleWithResponse Sample from a base model with your LoRA weights
//
// Generates samples from the model using the specified sampling parameters.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/asample (the `Asample` operationId).
AsampleWithResponse(ctx context.Context, body AsampleJSONRequestBody, reqEditors ...RequestEditorFn) (*AsampleHTTPResponse, error)
// CreateModelWithBodyWithResponse Creates a new model
//
// Creates a new model. Pass a LoRA config to create a new LoRA adapter for the base model.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/create_model (the `CreateModel` operationId).
CreateModelWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateModelHTTPResponse, error)
// CreateModelWithResponse Creates a new model
//
// Creates a new model. Pass a LoRA config to create a new LoRA adapter for the base model.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/create_model (the `CreateModel` operationId).
CreateModelWithResponse(ctx context.Context, body CreateModelJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateModelHTTPResponse, error)
// ForwardWithBodyWithResponse Forward pass
//
// Performs a forward pass through the model.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/forward (the `Forward` operationId).
ForwardWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ForwardHTTPResponse, error)
// ForwardWithResponse Forward pass
//
// Performs a forward pass through the model.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/forward (the `Forward` operationId).
ForwardWithResponse(ctx context.Context, body ForwardJSONRequestBody, reqEditors ...RequestEditorFn) (*ForwardHTTPResponse, error)
// ForwardBackwardWithBodyWithResponse Forward and backward pass
//
// Performs a forward and backward pass through the model.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/forward_backward (the `ForwardBackward` operationId).
ForwardBackwardWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ForwardBackwardHTTPResponse, error)
// ForwardBackwardWithResponse Forward and backward pass
//
// Performs a forward and backward pass through the model.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/forward_backward (the `ForwardBackward` operationId).
ForwardBackwardWithResponse(ctx context.Context, body ForwardBackwardJSONRequestBody, reqEditors ...RequestEditorFn) (*ForwardBackwardHTTPResponse, error)
// GetInfoWithBodyWithResponse Get model information
//
// Retrieves information about the current model.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/get_info (the `GetInfo` operationId).
GetInfoWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetInfoHTTPResponse, error)
// GetInfoWithResponse Get model information
//
// Retrieves information about the current model.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/get_info (the `GetInfo` operationId).
GetInfoWithResponse(ctx context.Context, body GetInfoJSONRequestBody, reqEditors ...RequestEditorFn) (*GetInfoHTTPResponse, error)
// GetServerCapabilitiesWithResponse Get server capabilities
//
// Retrieves information about supported models and server capabilities.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /api/v1/get_server_capabilities (the `GetServerCapabilities` operationId).
GetServerCapabilitiesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetServerCapabilitiesHTTPResponse, error)
// HealthCheckWithResponse Health check
//
// Checks if the API server is ready.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /api/v1/healthz (the `HealthCheck` operationId).
HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckHTTPResponse, error)
// LoadWeightsWithBodyWithResponse Load model weights
//
// Loads model weights from disk.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/load_weights (the `LoadWeights` operationId).
LoadWeightsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoadWeightsHTTPResponse, error)
// LoadWeightsWithResponse Load model weights
//
// Loads model weights from disk.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/load_weights (the `LoadWeights` operationId).
LoadWeightsWithResponse(ctx context.Context, body LoadWeightsJSONRequestBody, reqEditors ...RequestEditorFn) (*LoadWeightsHTTPResponse, error)
// OptimStepWithBodyWithResponse Optimization step
//
// Performs an optimization step using AdamW optimizer.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/optim_step (the `OptimStep` operationId).
OptimStepWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*OptimStepHTTPResponse, error)
// OptimStepWithResponse Optimization step
//
// Performs an optimization step using AdamW optimizer.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/optim_step (the `OptimStep` operationId).
OptimStepWithResponse(ctx context.Context, body OptimStepJSONRequestBody, reqEditors ...RequestEditorFn) (*OptimStepHTTPResponse, error)
// RetrieveFutureWithBodyWithResponse Retrieve future result
//
// Retrieves the result of a future by its ID.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/retrieve_future (the `RetrieveFuture` operationId).
RetrieveFutureWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RetrieveFutureHTTPResponse, error)
// RetrieveFutureWithResponse Retrieve future result
//
// Retrieves the result of a future by its ID.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/retrieve_future (the `RetrieveFuture` operationId).
RetrieveFutureWithResponse(ctx context.Context, body RetrieveFutureJSONRequestBody, reqEditors ...RequestEditorFn) (*RetrieveFutureHTTPResponse, error)
// SampleWithBodyWithResponse Sample from a base model with your LoRA weights
//
// Generates samples from the model using the specified sampling parameters.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/sample (the `Sample` operationId).
SampleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SampleHTTPResponse, error)
// SampleWithResponse Sample from a base model with your LoRA weights
//
// Generates samples from the model using the specified sampling parameters.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/sample (the `Sample` operationId).
SampleWithResponse(ctx context.Context, body SampleJSONRequestBody, reqEditors ...RequestEditorFn) (*SampleHTTPResponse, error)
// SaveWeightsWithBodyWithResponse Save model weights
//
// Saves the current model weights to disk.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/save_weights (the `SaveWeights` operationId).
SaveWeightsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SaveWeightsHTTPResponse, error)
// SaveWeightsWithResponse Save model weights
//
// Saves the current model weights to disk.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/save_weights (the `SaveWeights` operationId).
SaveWeightsWithResponse(ctx context.Context, body SaveWeightsJSONRequestBody, reqEditors ...RequestEditorFn) (*SaveWeightsHTTPResponse, error)
// SaveWeightsForSamplerWithBodyWithResponse Save weights for sampler
//
// Saves weights in a format compatible with sampling/inference servers.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/save_weights_for_sampler (the `SaveWeightsForSampler` operationId).
SaveWeightsForSamplerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SaveWeightsForSamplerHTTPResponse, error)
// SaveWeightsForSamplerWithResponse Save weights for sampler
//
// Saves weights in a format compatible with sampling/inference servers.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/save_weights_for_sampler (the `SaveWeightsForSampler` operationId).
SaveWeightsForSamplerWithResponse(ctx context.Context, body SaveWeightsForSamplerJSONRequestBody, reqEditors ...RequestEditorFn) (*SaveWeightsForSamplerHTTPResponse, error)
// ReceiveTelemetryWithBodyWithResponse Receive client telemetry
//
// Accepts batches of SDK telemetry events for analytics and diagnostics.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/telemetry (the `ReceiveTelemetry` operationId).
ReceiveTelemetryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReceiveTelemetryHTTPResponse, error)
// ReceiveTelemetryWithResponse Receive client telemetry
//
// Accepts batches of SDK telemetry events for analytics and diagnostics.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/telemetry (the `ReceiveTelemetry` operationId).
ReceiveTelemetryWithResponse(ctx context.Context, body ReceiveTelemetryJSONRequestBody, reqEditors ...RequestEditorFn) (*ReceiveTelemetryHTTPResponse, error)
// UnloadModelWithBodyWithResponse Unload the model's weights from GPUs. Optional, but hints that the user is done using the model for now; allows Tinker servers to free resources.
//
// Unload the model weights and ends the user's session.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/unload_model (the `UnloadModel` operationId).
UnloadModelWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UnloadModelHTTPResponse, error)
// UnloadModelWithResponse Unload the model's weights from GPUs. Optional, but hints that the user is done using the model for now; allows Tinker servers to free resources.
//
// Unload the model weights and ends the user's session.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/unload_model (the `UnloadModel` operationId).
UnloadModelWithResponse(ctx context.Context, body UnloadModelJSONRequestBody, reqEditors ...RequestEditorFn) (*UnloadModelHTTPResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateModelHTTPResponse ¶
type CreateModelHTTPResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *UntypedAPIFuture
}
func ParseCreateModelHTTPResponse ¶
func ParseCreateModelHTTPResponse(rsp *http.Response) (*CreateModelHTTPResponse, error)
ParseCreateModelHTTPResponse parses an HTTP response from a CreateModelWithResponse call
func (CreateModelHTTPResponse) ContentType ¶
func (r CreateModelHTTPResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateModelHTTPResponse) GetBody ¶
func (r CreateModelHTTPResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CreateModelHTTPResponse) GetJSON200 ¶
func (r CreateModelHTTPResponse) GetJSON200() *UntypedAPIFuture
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (CreateModelHTTPResponse) Status ¶
func (r CreateModelHTTPResponse) Status() string
Status returns HTTPResponse.Status
func (CreateModelHTTPResponse) StatusCode ¶
func (r CreateModelHTTPResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateModelJSONRequestBody ¶
type CreateModelJSONRequestBody = CreateModelRequest
CreateModelJSONRequestBody defines body for CreateModel for application/json ContentType.
type CreateModelRequest ¶
type CreateModelRequest struct {
// BaseModel Example: meta-llama/Llama-3.2-1B
BaseModel string `json:"base_model"`
LoraConfig *LoraConfig `json:"lora_config,omitempty"`
Type *CreateModelRequestType `json:"type,omitempty"`
}
CreateModelRequest defines model for CreateModelRequest.
type CreateModelRequestType ¶
type CreateModelRequestType string
CreateModelRequestType defines model for CreateModelRequest.Type.
const (
CreateModelRequestTypeCreateModel CreateModelRequestType = "create_model"
)
Defines values for CreateModelRequestType.
func (CreateModelRequestType) Valid ¶
func (e CreateModelRequestType) Valid() bool
Valid indicates whether the value is a known member of the CreateModelRequestType enum.
type CreateModelResponse ¶
type CreateModelResponse struct {
// ModelId Example: 123e4567-e89b-12d3-a456-426614174000
ModelId ModelId `json:"model_id"`
Type *CreateModelResponseType `json:"type,omitempty"`
}
CreateModelResponse defines model for CreateModelResponse.
type CreateModelResponseType ¶
type CreateModelResponseType string
CreateModelResponseType defines model for CreateModelResponse.Type.
const (
CreateModelResponseTypeCreateModel CreateModelResponseType = "create_model"
)
Defines values for CreateModelResponseType.
func (CreateModelResponseType) Valid ¶
func (e CreateModelResponseType) Valid() bool
Valid indicates whether the value is a known member of the CreateModelResponseType enum.
type Datum ¶
type Datum struct {
// LossFnInputs Dictionary mapping field names to tensor data
//
// Example: {"target_tokens":{"data":[123,456,789,101,202],"dtype":"int64"},"weights":{"data":[1,1,1,0.5,0],"dtype":"float32"}}
LossFnInputs LossFnInputs `json:"loss_fn_inputs"`
ModelInput ModelInput `json:"model_input"`
}
Datum defines model for Datum.
type EncodedTextChunk ¶
type EncodedTextChunk struct {
// Tokens Array of token IDs
//
// Example: [1234,5678,9012]
Tokens []int32 `json:"tokens"`
Type EncodedTextChunkType `json:"type"`
}
EncodedTextChunk defines model for EncodedTextChunk.
type EncodedTextChunkType ¶
type EncodedTextChunkType string
EncodedTextChunkType defines model for EncodedTextChunk.Type.
const (
EncodedTextChunkTypeEncodedText EncodedTextChunkType = "encoded_text"
)
Defines values for EncodedTextChunkType.
func (EncodedTextChunkType) Valid ¶
func (e EncodedTextChunkType) Valid() bool
Valid indicates whether the value is a known member of the EncodedTextChunkType enum.
type ErrorResponse ¶
type ErrorResponse struct {
// Details Additional error details
Details *map[string]interface{} `json:"details,omitempty"`
// Error Error code
//
// Example: INVALID_REQUEST
Error string `json:"error"`
// Message Human-readable error message
//
// Example: The provided request is invalid
Message string `json:"message"`
}
ErrorResponse defines model for ErrorResponse.
type EventType ¶
type EventType string
EventType Telemetry event type
type ForwardBackwardHTTPResponse ¶
type ForwardBackwardHTTPResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *UntypedAPIFuture
}
func ParseForwardBackwardHTTPResponse ¶
func ParseForwardBackwardHTTPResponse(rsp *http.Response) (*ForwardBackwardHTTPResponse, error)
ParseForwardBackwardHTTPResponse parses an HTTP response from a ForwardBackwardWithResponse call
func (ForwardBackwardHTTPResponse) ContentType ¶
func (r ForwardBackwardHTTPResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ForwardBackwardHTTPResponse) GetBody ¶
func (r ForwardBackwardHTTPResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ForwardBackwardHTTPResponse) GetJSON200 ¶
func (r ForwardBackwardHTTPResponse) GetJSON200() *UntypedAPIFuture
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ForwardBackwardHTTPResponse) Status ¶
func (r ForwardBackwardHTTPResponse) Status() string
Status returns HTTPResponse.Status
func (ForwardBackwardHTTPResponse) StatusCode ¶
func (r ForwardBackwardHTTPResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ForwardBackwardInput ¶
type ForwardBackwardInput struct {
// Data Array of input data for the forward/backward pass
Data []Datum `json:"data"`
// LossFn Fully qualified function path for the loss function
//
// Example: cross_entropy
LossFn LossFnType `json:"loss_fn"`
}
ForwardBackwardInput defines model for ForwardBackwardInput.
type ForwardBackwardJSONBody ¶
type ForwardBackwardJSONBody struct {
ForwardBackwardInput ForwardBackwardInput `json:"forward_backward_input"`
// ModelId Example: 123e4567-e89b-12d3-a456-426614174000
ModelId ModelId `json:"model_id"`
}
ForwardBackwardJSONBody defines parameters for ForwardBackward.
type ForwardBackwardJSONRequestBody ¶
type ForwardBackwardJSONRequestBody ForwardBackwardJSONBody
ForwardBackwardJSONRequestBody defines body for ForwardBackward for application/json ContentType.
type ForwardBackwardOutput ¶
type ForwardBackwardOutput struct {
// LossFnOutputType The type of the ForwardBackward output. Can be one of [...] TODO
//
// Example: TODO
LossFnOutputType string `json:"loss_fn_output_type"`
// LossFnOutputs Dictionary mapping field names to tensor data
LossFnOutputs []LossFnOutput `json:"loss_fn_outputs"`
// Metrics Training metrics as key-value pairs
//
// Example: {"accuracy":0.789,"loss":2.345,"perplexity":10.2}
Metrics map[string]ForwardBackwardOutput_Metrics_AdditionalProperties `json:"metrics"`
}
ForwardBackwardOutput defines model for ForwardBackwardOutput.
type ForwardBackwardOutputMetrics0 ¶
type ForwardBackwardOutputMetrics0 = float64
ForwardBackwardOutputMetrics0 defines model for ForwardBackwardOutput.Metrics.0.
type ForwardBackwardOutputMetrics1 ¶
type ForwardBackwardOutputMetrics1 = int
ForwardBackwardOutputMetrics1 defines model for ForwardBackwardOutput.Metrics.1.
type ForwardBackwardOutput_Metrics_AdditionalProperties ¶
type ForwardBackwardOutput_Metrics_AdditionalProperties struct {
// contains filtered or unexported fields
}
ForwardBackwardOutput_Metrics_AdditionalProperties defines model for ForwardBackwardOutput.metrics.AdditionalProperties.
func (ForwardBackwardOutput_Metrics_AdditionalProperties) AsForwardBackwardOutputMetrics0 ¶
func (t ForwardBackwardOutput_Metrics_AdditionalProperties) AsForwardBackwardOutputMetrics0() (ForwardBackwardOutputMetrics0, error)
AsForwardBackwardOutputMetrics0 returns the union data inside the ForwardBackwardOutput_Metrics_AdditionalProperties as a ForwardBackwardOutputMetrics0
func (ForwardBackwardOutput_Metrics_AdditionalProperties) AsForwardBackwardOutputMetrics1 ¶
func (t ForwardBackwardOutput_Metrics_AdditionalProperties) AsForwardBackwardOutputMetrics1() (ForwardBackwardOutputMetrics1, error)
AsForwardBackwardOutputMetrics1 returns the union data inside the ForwardBackwardOutput_Metrics_AdditionalProperties as a ForwardBackwardOutputMetrics1
func (*ForwardBackwardOutput_Metrics_AdditionalProperties) FromForwardBackwardOutputMetrics0 ¶
func (t *ForwardBackwardOutput_Metrics_AdditionalProperties) FromForwardBackwardOutputMetrics0(v ForwardBackwardOutputMetrics0) error
FromForwardBackwardOutputMetrics0 overwrites any union data inside the ForwardBackwardOutput_Metrics_AdditionalProperties as the provided ForwardBackwardOutputMetrics0
func (*ForwardBackwardOutput_Metrics_AdditionalProperties) FromForwardBackwardOutputMetrics1 ¶
func (t *ForwardBackwardOutput_Metrics_AdditionalProperties) FromForwardBackwardOutputMetrics1(v ForwardBackwardOutputMetrics1) error
FromForwardBackwardOutputMetrics1 overwrites any union data inside the ForwardBackwardOutput_Metrics_AdditionalProperties as the provided ForwardBackwardOutputMetrics1
func (ForwardBackwardOutput_Metrics_AdditionalProperties) MarshalJSON ¶
func (t ForwardBackwardOutput_Metrics_AdditionalProperties) MarshalJSON() ([]byte, error)
func (*ForwardBackwardOutput_Metrics_AdditionalProperties) MergeForwardBackwardOutputMetrics0 ¶
func (t *ForwardBackwardOutput_Metrics_AdditionalProperties) MergeForwardBackwardOutputMetrics0(v ForwardBackwardOutputMetrics0) error
MergeForwardBackwardOutputMetrics0 performs a merge with any union data inside the ForwardBackwardOutput_Metrics_AdditionalProperties, using the provided ForwardBackwardOutputMetrics0
func (*ForwardBackwardOutput_Metrics_AdditionalProperties) MergeForwardBackwardOutputMetrics1 ¶
func (t *ForwardBackwardOutput_Metrics_AdditionalProperties) MergeForwardBackwardOutputMetrics1(v ForwardBackwardOutputMetrics1) error
MergeForwardBackwardOutputMetrics1 performs a merge with any union data inside the ForwardBackwardOutput_Metrics_AdditionalProperties, using the provided ForwardBackwardOutputMetrics1
func (*ForwardBackwardOutput_Metrics_AdditionalProperties) UnmarshalJSON ¶
func (t *ForwardBackwardOutput_Metrics_AdditionalProperties) UnmarshalJSON(b []byte) error
type ForwardHTTPResponse ¶
type ForwardHTTPResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *UntypedAPIFuture
}
func ParseForwardHTTPResponse ¶
func ParseForwardHTTPResponse(rsp *http.Response) (*ForwardHTTPResponse, error)
ParseForwardHTTPResponse parses an HTTP response from a ForwardWithResponse call
func (ForwardHTTPResponse) ContentType ¶
func (r ForwardHTTPResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ForwardHTTPResponse) GetBody ¶
func (r ForwardHTTPResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ForwardHTTPResponse) GetJSON200 ¶
func (r ForwardHTTPResponse) GetJSON200() *UntypedAPIFuture
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ForwardHTTPResponse) Status ¶
func (r ForwardHTTPResponse) Status() string
Status returns HTTPResponse.Status
func (ForwardHTTPResponse) StatusCode ¶
func (r ForwardHTTPResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ForwardJSONBody ¶
type ForwardJSONBody struct {
ForwardInput ForwardBackwardInput `json:"forward_input"`
// ModelId Example: 123e4567-e89b-12d3-a456-426614174000
ModelId ModelId `json:"model_id"`
}
ForwardJSONBody defines parameters for Forward.
type ForwardJSONRequestBody ¶
type ForwardJSONRequestBody ForwardJSONBody
ForwardJSONRequestBody defines body for Forward for application/json ContentType.
type GetInfoHTTPResponse ¶
type GetInfoHTTPResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *GetInfoResponse
}
func ParseGetInfoHTTPResponse ¶
func ParseGetInfoHTTPResponse(rsp *http.Response) (*GetInfoHTTPResponse, error)
ParseGetInfoHTTPResponse parses an HTTP response from a GetInfoWithResponse call
func (GetInfoHTTPResponse) ContentType ¶
func (r GetInfoHTTPResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetInfoHTTPResponse) GetBody ¶
func (r GetInfoHTTPResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetInfoHTTPResponse) GetJSON200 ¶
func (r GetInfoHTTPResponse) GetJSON200() *GetInfoResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetInfoHTTPResponse) Status ¶
func (r GetInfoHTTPResponse) Status() string
Status returns HTTPResponse.Status
func (GetInfoHTTPResponse) StatusCode ¶
func (r GetInfoHTTPResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetInfoJSONRequestBody ¶
type GetInfoJSONRequestBody = GetInfoRequest
GetInfoJSONRequestBody defines body for GetInfo for application/json ContentType.
type GetInfoRequest ¶
type GetInfoRequest struct {
// ModelId Example: 123e4567-e89b-12d3-a456-426614174000
ModelId ModelId `json:"model_id"`
Type *GetInfoRequestType `json:"type,omitempty"`
}
GetInfoRequest defines model for GetInfoRequest.
type GetInfoRequestType ¶
type GetInfoRequestType string
GetInfoRequestType defines model for GetInfoRequest.Type.
const (
GetInfoRequestTypeGetInfo GetInfoRequestType = "get_info"
)
Defines values for GetInfoRequestType.
func (GetInfoRequestType) Valid ¶
func (e GetInfoRequestType) Valid() bool
Valid indicates whether the value is a known member of the GetInfoRequestType enum.
type GetInfoResponse ¶
type GetInfoResponse struct {
ModelData struct {
// Arch Example: llama
Arch *string `json:"arch,omitempty"`
// ModelName Example: meta-llama/Llama-3.2-1B
ModelName *string `json:"model_name,omitempty"`
} `json:"model_data"`
// ModelId Example: 123e4567-e89b-12d3-a456-426614174000
ModelId ModelId `json:"model_id"`
}
GetInfoResponse defines model for GetInfoResponse.
type GetServerCapabilitiesHTTPResponse ¶
type GetServerCapabilitiesHTTPResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *GetServerCapabilitiesResponse
}
func ParseGetServerCapabilitiesHTTPResponse ¶
func ParseGetServerCapabilitiesHTTPResponse(rsp *http.Response) (*GetServerCapabilitiesHTTPResponse, error)
ParseGetServerCapabilitiesHTTPResponse parses an HTTP response from a GetServerCapabilitiesWithResponse call
func (GetServerCapabilitiesHTTPResponse) ContentType ¶
func (r GetServerCapabilitiesHTTPResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetServerCapabilitiesHTTPResponse) GetBody ¶
func (r GetServerCapabilitiesHTTPResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetServerCapabilitiesHTTPResponse) GetJSON200 ¶
func (r GetServerCapabilitiesHTTPResponse) GetJSON200() *GetServerCapabilitiesResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetServerCapabilitiesHTTPResponse) Status ¶
func (r GetServerCapabilitiesHTTPResponse) Status() string
Status returns HTTPResponse.Status
func (GetServerCapabilitiesHTTPResponse) StatusCode ¶
func (r GetServerCapabilitiesHTTPResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetServerCapabilitiesResponse ¶
type GetServerCapabilitiesResponse struct {
SupportedModels []struct {
// Arch Example: llama
Arch *string `json:"arch,omitempty"`
ModelId *string `json:"model_id,omitempty"`
// ModelName Example: meta-llama/Llama-3.2-1B
ModelName *string `json:"model_name,omitempty"`
} `json:"supported_models"`
}
GetServerCapabilitiesResponse defines model for GetServerCapabilitiesResponse.
type HealthCheckHTTPResponse ¶
type HealthCheckHTTPResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *HealthResponse
}
func ParseHealthCheckHTTPResponse ¶
func ParseHealthCheckHTTPResponse(rsp *http.Response) (*HealthCheckHTTPResponse, error)
ParseHealthCheckHTTPResponse parses an HTTP response from a HealthCheckWithResponse call
func (HealthCheckHTTPResponse) ContentType ¶
func (r HealthCheckHTTPResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (HealthCheckHTTPResponse) GetBody ¶
func (r HealthCheckHTTPResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (HealthCheckHTTPResponse) GetJSON200 ¶
func (r HealthCheckHTTPResponse) GetJSON200() *HealthResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (HealthCheckHTTPResponse) Status ¶
func (r HealthCheckHTTPResponse) Status() string
Status returns HTTPResponse.Status
func (HealthCheckHTTPResponse) StatusCode ¶
func (r HealthCheckHTTPResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HealthResponse ¶
type HealthResponse struct {
// Status Example: ok
Status HealthResponseStatus `json:"status"`
}
HealthResponse defines model for HealthResponse.
type HealthResponseStatus ¶
type HealthResponseStatus string
HealthResponseStatus Example: ok
const (
HealthResponseStatusOk HealthResponseStatus = "ok"
)
Defines values for HealthResponseStatus.
func (HealthResponseStatus) Valid ¶
func (e HealthResponseStatus) Valid() bool
Valid indicates whether the value is a known member of the HealthResponseStatus enum.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ImageAssetPointerChunk ¶
type ImageAssetPointerChunk struct {
// Format Image format
Format ImageAssetPointerChunkFormat `json:"format"`
// Height Image height in pixels
Height int32 `json:"height"`
// Location Path or URL to the image asset
//
// Example: /path/to/image.jpg
Location string `json:"location"`
// ProcessImageFunctionName Name of the function to process this image
//
// Example: process_image_default
ProcessImageFunctionName string `json:"process_image_function_name"`
// Tokens Number of tokens this image represents
Tokens int32 `json:"tokens"`
Type ImageAssetPointerChunkType `json:"type"`
// Width Image width in pixels
Width int32 `json:"width"`
}
ImageAssetPointerChunk defines model for ImageAssetPointerChunk.
type ImageAssetPointerChunkFormat ¶
type ImageAssetPointerChunkFormat string
ImageAssetPointerChunkFormat Image format
const ( ImageAssetPointerChunkFormatJpeg ImageAssetPointerChunkFormat = "jpeg" ImageAssetPointerChunkFormatPng ImageAssetPointerChunkFormat = "png" )
Defines values for ImageAssetPointerChunkFormat.
func (ImageAssetPointerChunkFormat) Valid ¶
func (e ImageAssetPointerChunkFormat) Valid() bool
Valid indicates whether the value is a known member of the ImageAssetPointerChunkFormat enum.
type ImageAssetPointerChunkType ¶
type ImageAssetPointerChunkType string
ImageAssetPointerChunkType defines model for ImageAssetPointerChunk.Type.
const (
ImageAssetPointerChunkTypeImageAssetPointer ImageAssetPointerChunkType = "image_asset_pointer"
)
Defines values for ImageAssetPointerChunkType.
func (ImageAssetPointerChunkType) Valid ¶
func (e ImageAssetPointerChunkType) Valid() bool
Valid indicates whether the value is a known member of the ImageAssetPointerChunkType enum.
type LoadWeightsHTTPResponse ¶
type LoadWeightsHTTPResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *UntypedAPIFuture
}
func ParseLoadWeightsHTTPResponse ¶
func ParseLoadWeightsHTTPResponse(rsp *http.Response) (*LoadWeightsHTTPResponse, error)
ParseLoadWeightsHTTPResponse parses an HTTP response from a LoadWeightsWithResponse call
func (LoadWeightsHTTPResponse) ContentType ¶
func (r LoadWeightsHTTPResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (LoadWeightsHTTPResponse) GetBody ¶
func (r LoadWeightsHTTPResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (LoadWeightsHTTPResponse) GetJSON200 ¶
func (r LoadWeightsHTTPResponse) GetJSON200() *UntypedAPIFuture
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (LoadWeightsHTTPResponse) Status ¶
func (r LoadWeightsHTTPResponse) Status() string
Status returns HTTPResponse.Status
func (LoadWeightsHTTPResponse) StatusCode ¶
func (r LoadWeightsHTTPResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type LoadWeightsJSONRequestBody ¶
type LoadWeightsJSONRequestBody = LoadWeightsRequest
LoadWeightsJSONRequestBody defines body for LoadWeights for application/json ContentType.
type LoadWeightsRequest ¶
type LoadWeightsRequest struct {
// ModelId Example: 123e4567-e89b-12d3-a456-426614174000
ModelId ModelId `json:"model_id"`
// Path A tinker URI for model weights at a specific step
//
// Example: tinker://model-id/weights/step-0123
Path TinkerWeightsPath `json:"path"`
Type *LoadWeightsRequestType `json:"type,omitempty"`
}
LoadWeightsRequest defines model for LoadWeightsRequest.
type LoadWeightsRequestType ¶
type LoadWeightsRequestType string
LoadWeightsRequestType defines model for LoadWeightsRequest.Type.
const (
LoadWeightsRequestTypeLoadWeights LoadWeightsRequestType = "load_weights"
)
Defines values for LoadWeightsRequestType.
func (LoadWeightsRequestType) Valid ¶
func (e LoadWeightsRequestType) Valid() bool
Valid indicates whether the value is a known member of the LoadWeightsRequestType enum.
type LoadWeightsResponse ¶
type LoadWeightsResponse struct {
// Path A tinker URI for model weights at a specific step
//
// Example: tinker://model-id/weights/step-0123
Path *TinkerWeightsPath `json:"path,omitempty"`
Type *LoadWeightsResponseType `json:"type,omitempty"`
}
LoadWeightsResponse defines model for LoadWeightsResponse.
type LoadWeightsResponseType ¶
type LoadWeightsResponseType string
LoadWeightsResponseType defines model for LoadWeightsResponse.Type.
const (
LoadWeightsResponseTypeLoadWeights LoadWeightsResponseType = "load_weights"
)
Defines values for LoadWeightsResponseType.
func (LoadWeightsResponseType) Valid ¶
func (e LoadWeightsResponseType) Valid() bool
Valid indicates whether the value is a known member of the LoadWeightsResponseType enum.
type LoraConfig ¶
type LoraConfig struct {
// Rank LoRA rank (dimension of low-rank matrices)
//
// Example: 16
Rank int32 `json:"rank"`
// Seed Seed used for initialization of LoRA weights. Useful if you need deterministic or reproducible initialization of weights.
//
// Example: 42
Seed *int `json:"seed,omitempty"`
}
LoraConfig defines model for LoraConfig.
type LossFnInputs ¶
type LossFnInputs map[string]TensorData
LossFnInputs Dictionary mapping field names to tensor data
Example: {"target_tokens":{"data":[123,456,789,101,202],"dtype":"int64"},"weights":{"data":[1,1,1,0.5,0],"dtype":"float32"}}
type LossFnOutput ¶
type LossFnOutput map[string]TensorData
LossFnOutput defines model for LossFnOutput.
type LossFnType ¶
type LossFnType string
LossFnType Fully qualified function path for the loss function
Example: cross_entropy
const ( LossFnTypeCrossEntropy LossFnType = "cross_entropy" LossFnTypeImportanceSampling LossFnType = "importance_sampling" )
Defines values for LossFnType.
func (LossFnType) Valid ¶
func (e LossFnType) Valid() bool
Valid indicates whether the value is a known member of the LossFnType enum.
type ModelId ¶
type ModelId = openapi_types.UUID
ModelId Example: 123e4567-e89b-12d3-a456-426614174000
type ModelInput ¶
type ModelInput struct {
// Chunks Sequence of input chunks (formerly TokenSequence)
Chunks []ModelInputChunk `json:"chunks"`
}
ModelInput defines model for ModelInput.
type ModelInputChunk ¶
type ModelInputChunk struct {
// contains filtered or unexported fields
}
ModelInputChunk defines model for ModelInputChunk.
func (ModelInputChunk) AsEncodedTextChunk ¶
func (t ModelInputChunk) AsEncodedTextChunk() (EncodedTextChunk, error)
AsEncodedTextChunk returns the union data inside the ModelInputChunk as a EncodedTextChunk
func (ModelInputChunk) AsImageAssetPointerChunk ¶
func (t ModelInputChunk) AsImageAssetPointerChunk() (ImageAssetPointerChunk, error)
AsImageAssetPointerChunk returns the union data inside the ModelInputChunk as a ImageAssetPointerChunk
func (ModelInputChunk) Discriminator ¶
func (t ModelInputChunk) Discriminator() (string, error)
func (*ModelInputChunk) FromEncodedTextChunk ¶
func (t *ModelInputChunk) FromEncodedTextChunk(v EncodedTextChunk) error
FromEncodedTextChunk overwrites any union data inside the ModelInputChunk as the provided EncodedTextChunk
func (*ModelInputChunk) FromImageAssetPointerChunk ¶
func (t *ModelInputChunk) FromImageAssetPointerChunk(v ImageAssetPointerChunk) error
FromImageAssetPointerChunk overwrites any union data inside the ModelInputChunk as the provided ImageAssetPointerChunk
func (ModelInputChunk) MarshalJSON ¶
func (t ModelInputChunk) MarshalJSON() ([]byte, error)
func (*ModelInputChunk) MergeEncodedTextChunk ¶
func (t *ModelInputChunk) MergeEncodedTextChunk(v EncodedTextChunk) error
MergeEncodedTextChunk performs a merge with any union data inside the ModelInputChunk, using the provided EncodedTextChunk
func (*ModelInputChunk) MergeImageAssetPointerChunk ¶
func (t *ModelInputChunk) MergeImageAssetPointerChunk(v ImageAssetPointerChunk) error
MergeImageAssetPointerChunk performs a merge with any union data inside the ModelInputChunk, using the provided ImageAssetPointerChunk
func (*ModelInputChunk) UnmarshalJSON ¶
func (t *ModelInputChunk) UnmarshalJSON(b []byte) error
func (ModelInputChunk) ValueByDiscriminator ¶
func (t ModelInputChunk) ValueByDiscriminator() (interface{}, error)
type OptimStepHTTPResponse ¶
type OptimStepHTTPResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *UntypedAPIFuture
}
func ParseOptimStepHTTPResponse ¶
func ParseOptimStepHTTPResponse(rsp *http.Response) (*OptimStepHTTPResponse, error)
ParseOptimStepHTTPResponse parses an HTTP response from a OptimStepWithResponse call
func (OptimStepHTTPResponse) ContentType ¶
func (r OptimStepHTTPResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (OptimStepHTTPResponse) GetBody ¶
func (r OptimStepHTTPResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (OptimStepHTTPResponse) GetJSON200 ¶
func (r OptimStepHTTPResponse) GetJSON200() *UntypedAPIFuture
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (OptimStepHTTPResponse) Status ¶
func (r OptimStepHTTPResponse) Status() string
Status returns HTTPResponse.Status
func (OptimStepHTTPResponse) StatusCode ¶
func (r OptimStepHTTPResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type OptimStepJSONRequestBody ¶
type OptimStepJSONRequestBody = OptimStepRequest
OptimStepJSONRequestBody defines body for OptimStep for application/json ContentType.
type OptimStepRequest ¶
type OptimStepRequest struct {
AdamParams AdamParams `json:"adam_params"`
// ModelId Example: 123e4567-e89b-12d3-a456-426614174000
ModelId ModelId `json:"model_id"`
Type *OptimStepRequestType `json:"type,omitempty"`
}
OptimStepRequest defines model for OptimStepRequest.
type OptimStepRequestType ¶
type OptimStepRequestType string
OptimStepRequestType defines model for OptimStepRequest.Type.
const (
OptimStepRequestTypeOptimStep OptimStepRequestType = "optim_step"
)
Defines values for OptimStepRequestType.
func (OptimStepRequestType) Valid ¶
func (e OptimStepRequestType) Valid() bool
Valid indicates whether the value is a known member of the OptimStepRequestType enum.
type OptimStepResponse ¶
type OptimStepResponse map[string]OptimStepResponse_AdditionalProperties
OptimStepResponse Optimization step results with arbitrary key-value pairs
Example: {"gradient_norm":0.456,"learning_rate":0.00001,"status":"completed","step":1000}
type OptimStepResponse0 ¶
type OptimStepResponse0 = int
OptimStepResponse0 defines model for OptimStepResponse.0.
type OptimStepResponse1 ¶
type OptimStepResponse1 = float64
OptimStepResponse1 defines model for OptimStepResponse.1.
type OptimStepResponse2 ¶
type OptimStepResponse2 = string
OptimStepResponse2 defines model for OptimStepResponse.2.
type OptimStepResponse_AdditionalProperties ¶
type OptimStepResponse_AdditionalProperties struct {
// contains filtered or unexported fields
}
OptimStepResponse_AdditionalProperties defines model for OptimStepResponse.AdditionalProperties.
func (OptimStepResponse_AdditionalProperties) AsOptimStepResponse0 ¶
func (t OptimStepResponse_AdditionalProperties) AsOptimStepResponse0() (OptimStepResponse0, error)
AsOptimStepResponse0 returns the union data inside the OptimStepResponse_AdditionalProperties as a OptimStepResponse0
func (OptimStepResponse_AdditionalProperties) AsOptimStepResponse1 ¶
func (t OptimStepResponse_AdditionalProperties) AsOptimStepResponse1() (OptimStepResponse1, error)
AsOptimStepResponse1 returns the union data inside the OptimStepResponse_AdditionalProperties as a OptimStepResponse1
func (OptimStepResponse_AdditionalProperties) AsOptimStepResponse2 ¶
func (t OptimStepResponse_AdditionalProperties) AsOptimStepResponse2() (OptimStepResponse2, error)
AsOptimStepResponse2 returns the union data inside the OptimStepResponse_AdditionalProperties as a OptimStepResponse2
func (*OptimStepResponse_AdditionalProperties) FromOptimStepResponse0 ¶
func (t *OptimStepResponse_AdditionalProperties) FromOptimStepResponse0(v OptimStepResponse0) error
FromOptimStepResponse0 overwrites any union data inside the OptimStepResponse_AdditionalProperties as the provided OptimStepResponse0
func (*OptimStepResponse_AdditionalProperties) FromOptimStepResponse1 ¶
func (t *OptimStepResponse_AdditionalProperties) FromOptimStepResponse1(v OptimStepResponse1) error
FromOptimStepResponse1 overwrites any union data inside the OptimStepResponse_AdditionalProperties as the provided OptimStepResponse1
func (*OptimStepResponse_AdditionalProperties) FromOptimStepResponse2 ¶
func (t *OptimStepResponse_AdditionalProperties) FromOptimStepResponse2(v OptimStepResponse2) error
FromOptimStepResponse2 overwrites any union data inside the OptimStepResponse_AdditionalProperties as the provided OptimStepResponse2
func (OptimStepResponse_AdditionalProperties) MarshalJSON ¶
func (t OptimStepResponse_AdditionalProperties) MarshalJSON() ([]byte, error)
func (*OptimStepResponse_AdditionalProperties) MergeOptimStepResponse0 ¶
func (t *OptimStepResponse_AdditionalProperties) MergeOptimStepResponse0(v OptimStepResponse0) error
MergeOptimStepResponse0 performs a merge with any union data inside the OptimStepResponse_AdditionalProperties, using the provided OptimStepResponse0
func (*OptimStepResponse_AdditionalProperties) MergeOptimStepResponse1 ¶
func (t *OptimStepResponse_AdditionalProperties) MergeOptimStepResponse1(v OptimStepResponse1) error
MergeOptimStepResponse1 performs a merge with any union data inside the OptimStepResponse_AdditionalProperties, using the provided OptimStepResponse1
func (*OptimStepResponse_AdditionalProperties) MergeOptimStepResponse2 ¶
func (t *OptimStepResponse_AdditionalProperties) MergeOptimStepResponse2(v OptimStepResponse2) error
MergeOptimStepResponse2 performs a merge with any union data inside the OptimStepResponse_AdditionalProperties, using the provided OptimStepResponse2
func (*OptimStepResponse_AdditionalProperties) UnmarshalJSON ¶
func (t *OptimStepResponse_AdditionalProperties) UnmarshalJSON(b []byte) error
type ReceiveTelemetryHTTPResponse ¶
type ReceiveTelemetryHTTPResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON202 the response for an HTTP 202 `application/json` response
JSON202 *TelemetryResponse
}
func ParseReceiveTelemetryHTTPResponse ¶
func ParseReceiveTelemetryHTTPResponse(rsp *http.Response) (*ReceiveTelemetryHTTPResponse, error)
ParseReceiveTelemetryHTTPResponse parses an HTTP response from a ReceiveTelemetryWithResponse call
func (ReceiveTelemetryHTTPResponse) ContentType ¶
func (r ReceiveTelemetryHTTPResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ReceiveTelemetryHTTPResponse) GetBody ¶
func (r ReceiveTelemetryHTTPResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ReceiveTelemetryHTTPResponse) GetJSON202 ¶
func (r ReceiveTelemetryHTTPResponse) GetJSON202() *TelemetryResponse
GetJSON202 returns the response for an HTTP 202 `application/json` response
func (ReceiveTelemetryHTTPResponse) Status ¶
func (r ReceiveTelemetryHTTPResponse) Status() string
Status returns HTTPResponse.Status
func (ReceiveTelemetryHTTPResponse) StatusCode ¶
func (r ReceiveTelemetryHTTPResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ReceiveTelemetryJSONRequestBody ¶
type ReceiveTelemetryJSONRequestBody = TelemetryBatch
ReceiveTelemetryJSONRequestBody defines body for ReceiveTelemetry for application/json ContentType.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RequestId ¶
type RequestId = openapi_types.UUID
RequestId Example: 123e4567-e89b-12d3-a456-426614174000
type RetrieveFuture200JSONResponseBody ¶
type RetrieveFuture200JSONResponseBody struct {
// contains filtered or unexported fields
}
RetrieveFuture200JSONResponseBody defines parameters for RetrieveFuture.
func (RetrieveFuture200JSONResponseBody) AsCreateModelResponse ¶
func (t RetrieveFuture200JSONResponseBody) AsCreateModelResponse() (CreateModelResponse, error)
AsCreateModelResponse returns the union data inside the RetrieveFuture200JSONResponseBody as a CreateModelResponse
func (RetrieveFuture200JSONResponseBody) AsForwardBackwardOutput ¶
func (t RetrieveFuture200JSONResponseBody) AsForwardBackwardOutput() (ForwardBackwardOutput, error)
AsForwardBackwardOutput returns the union data inside the RetrieveFuture200JSONResponseBody as a ForwardBackwardOutput
func (RetrieveFuture200JSONResponseBody) AsLoadWeightsResponse ¶
func (t RetrieveFuture200JSONResponseBody) AsLoadWeightsResponse() (LoadWeightsResponse, error)
AsLoadWeightsResponse returns the union data inside the RetrieveFuture200JSONResponseBody as a LoadWeightsResponse
func (RetrieveFuture200JSONResponseBody) AsOptimStepResponse ¶
func (t RetrieveFuture200JSONResponseBody) AsOptimStepResponse() (OptimStepResponse, error)
AsOptimStepResponse returns the union data inside the RetrieveFuture200JSONResponseBody as a OptimStepResponse
func (RetrieveFuture200JSONResponseBody) AsSaveWeightsForSamplerResponse ¶
func (t RetrieveFuture200JSONResponseBody) AsSaveWeightsForSamplerResponse() (SaveWeightsForSamplerResponse, error)
AsSaveWeightsForSamplerResponse returns the union data inside the RetrieveFuture200JSONResponseBody as a SaveWeightsForSamplerResponse
func (RetrieveFuture200JSONResponseBody) AsSaveWeightsResponse ¶
func (t RetrieveFuture200JSONResponseBody) AsSaveWeightsResponse() (SaveWeightsResponse, error)
AsSaveWeightsResponse returns the union data inside the RetrieveFuture200JSONResponseBody as a SaveWeightsResponse
func (RetrieveFuture200JSONResponseBody) AsTryAgainResponse ¶
func (t RetrieveFuture200JSONResponseBody) AsTryAgainResponse() (TryAgainResponse, error)
AsTryAgainResponse returns the union data inside the RetrieveFuture200JSONResponseBody as a TryAgainResponse
func (RetrieveFuture200JSONResponseBody) AsUnloadModelResponse ¶
func (t RetrieveFuture200JSONResponseBody) AsUnloadModelResponse() (UnloadModelResponse, error)
AsUnloadModelResponse returns the union data inside the RetrieveFuture200JSONResponseBody as a UnloadModelResponse
func (*RetrieveFuture200JSONResponseBody) FromCreateModelResponse ¶
func (t *RetrieveFuture200JSONResponseBody) FromCreateModelResponse(v CreateModelResponse) error
FromCreateModelResponse overwrites any union data inside the RetrieveFuture200JSONResponseBody as the provided CreateModelResponse
func (*RetrieveFuture200JSONResponseBody) FromForwardBackwardOutput ¶
func (t *RetrieveFuture200JSONResponseBody) FromForwardBackwardOutput(v ForwardBackwardOutput) error
FromForwardBackwardOutput overwrites any union data inside the RetrieveFuture200JSONResponseBody as the provided ForwardBackwardOutput
func (*RetrieveFuture200JSONResponseBody) FromLoadWeightsResponse ¶
func (t *RetrieveFuture200JSONResponseBody) FromLoadWeightsResponse(v LoadWeightsResponse) error
FromLoadWeightsResponse overwrites any union data inside the RetrieveFuture200JSONResponseBody as the provided LoadWeightsResponse
func (*RetrieveFuture200JSONResponseBody) FromOptimStepResponse ¶
func (t *RetrieveFuture200JSONResponseBody) FromOptimStepResponse(v OptimStepResponse) error
FromOptimStepResponse overwrites any union data inside the RetrieveFuture200JSONResponseBody as the provided OptimStepResponse
func (*RetrieveFuture200JSONResponseBody) FromSaveWeightsForSamplerResponse ¶
func (t *RetrieveFuture200JSONResponseBody) FromSaveWeightsForSamplerResponse(v SaveWeightsForSamplerResponse) error
FromSaveWeightsForSamplerResponse overwrites any union data inside the RetrieveFuture200JSONResponseBody as the provided SaveWeightsForSamplerResponse
func (*RetrieveFuture200JSONResponseBody) FromSaveWeightsResponse ¶
func (t *RetrieveFuture200JSONResponseBody) FromSaveWeightsResponse(v SaveWeightsResponse) error
FromSaveWeightsResponse overwrites any union data inside the RetrieveFuture200JSONResponseBody as the provided SaveWeightsResponse
func (*RetrieveFuture200JSONResponseBody) FromTryAgainResponse ¶
func (t *RetrieveFuture200JSONResponseBody) FromTryAgainResponse(v TryAgainResponse) error
FromTryAgainResponse overwrites any union data inside the RetrieveFuture200JSONResponseBody as the provided TryAgainResponse
func (*RetrieveFuture200JSONResponseBody) FromUnloadModelResponse ¶
func (t *RetrieveFuture200JSONResponseBody) FromUnloadModelResponse(v UnloadModelResponse) error
FromUnloadModelResponse overwrites any union data inside the RetrieveFuture200JSONResponseBody as the provided UnloadModelResponse
func (RetrieveFuture200JSONResponseBody) MarshalJSON ¶
func (t RetrieveFuture200JSONResponseBody) MarshalJSON() ([]byte, error)
func (*RetrieveFuture200JSONResponseBody) MergeCreateModelResponse ¶
func (t *RetrieveFuture200JSONResponseBody) MergeCreateModelResponse(v CreateModelResponse) error
MergeCreateModelResponse performs a merge with any union data inside the RetrieveFuture200JSONResponseBody, using the provided CreateModelResponse
func (*RetrieveFuture200JSONResponseBody) MergeForwardBackwardOutput ¶
func (t *RetrieveFuture200JSONResponseBody) MergeForwardBackwardOutput(v ForwardBackwardOutput) error
MergeForwardBackwardOutput performs a merge with any union data inside the RetrieveFuture200JSONResponseBody, using the provided ForwardBackwardOutput
func (*RetrieveFuture200JSONResponseBody) MergeLoadWeightsResponse ¶
func (t *RetrieveFuture200JSONResponseBody) MergeLoadWeightsResponse(v LoadWeightsResponse) error
MergeLoadWeightsResponse performs a merge with any union data inside the RetrieveFuture200JSONResponseBody, using the provided LoadWeightsResponse
func (*RetrieveFuture200JSONResponseBody) MergeOptimStepResponse ¶
func (t *RetrieveFuture200JSONResponseBody) MergeOptimStepResponse(v OptimStepResponse) error
MergeOptimStepResponse performs a merge with any union data inside the RetrieveFuture200JSONResponseBody, using the provided OptimStepResponse
func (*RetrieveFuture200JSONResponseBody) MergeSaveWeightsForSamplerResponse ¶
func (t *RetrieveFuture200JSONResponseBody) MergeSaveWeightsForSamplerResponse(v SaveWeightsForSamplerResponse) error
MergeSaveWeightsForSamplerResponse performs a merge with any union data inside the RetrieveFuture200JSONResponseBody, using the provided SaveWeightsForSamplerResponse
func (*RetrieveFuture200JSONResponseBody) MergeSaveWeightsResponse ¶
func (t *RetrieveFuture200JSONResponseBody) MergeSaveWeightsResponse(v SaveWeightsResponse) error
MergeSaveWeightsResponse performs a merge with any union data inside the RetrieveFuture200JSONResponseBody, using the provided SaveWeightsResponse
func (*RetrieveFuture200JSONResponseBody) MergeTryAgainResponse ¶
func (t *RetrieveFuture200JSONResponseBody) MergeTryAgainResponse(v TryAgainResponse) error
MergeTryAgainResponse performs a merge with any union data inside the RetrieveFuture200JSONResponseBody, using the provided TryAgainResponse
func (*RetrieveFuture200JSONResponseBody) MergeUnloadModelResponse ¶
func (t *RetrieveFuture200JSONResponseBody) MergeUnloadModelResponse(v UnloadModelResponse) error
MergeUnloadModelResponse performs a merge with any union data inside the RetrieveFuture200JSONResponseBody, using the provided UnloadModelResponse
func (*RetrieveFuture200JSONResponseBody) UnmarshalJSON ¶
func (t *RetrieveFuture200JSONResponseBody) UnmarshalJSON(b []byte) error
type RetrieveFutureHTTPResponse ¶
type RetrieveFutureHTTPResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *RetrieveFuture200JSONResponseBody
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *ErrorResponse
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *ErrorResponse
// JSON408 the response for an HTTP 408 `application/json` response
JSON408 *TryAgainResponse
}
func ParseRetrieveFutureHTTPResponse ¶
func ParseRetrieveFutureHTTPResponse(rsp *http.Response) (*RetrieveFutureHTTPResponse, error)
ParseRetrieveFutureHTTPResponse parses an HTTP response from a RetrieveFutureWithResponse call
func (RetrieveFutureHTTPResponse) ContentType ¶
func (r RetrieveFutureHTTPResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (RetrieveFutureHTTPResponse) GetBody ¶
func (r RetrieveFutureHTTPResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (RetrieveFutureHTTPResponse) GetJSON200 ¶
func (r RetrieveFutureHTTPResponse) GetJSON200() *RetrieveFuture200JSONResponseBody
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (RetrieveFutureHTTPResponse) GetJSON400 ¶
func (r RetrieveFutureHTTPResponse) GetJSON400() *ErrorResponse
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (RetrieveFutureHTTPResponse) GetJSON404 ¶
func (r RetrieveFutureHTTPResponse) GetJSON404() *ErrorResponse
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (RetrieveFutureHTTPResponse) GetJSON408 ¶
func (r RetrieveFutureHTTPResponse) GetJSON408() *TryAgainResponse
GetJSON408 returns the response for an HTTP 408 `application/json` response
func (RetrieveFutureHTTPResponse) Status ¶
func (r RetrieveFutureHTTPResponse) Status() string
Status returns HTTPResponse.Status
func (RetrieveFutureHTTPResponse) StatusCode ¶
func (r RetrieveFutureHTTPResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RetrieveFutureJSONRequestBody ¶
type RetrieveFutureJSONRequestBody = UntypedAPIFuture
RetrieveFutureJSONRequestBody defines body for RetrieveFuture for application/json ContentType.
type SampleHTTPResponse ¶
type SampleHTTPResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *SampleResponse
}
func ParseSampleHTTPResponse ¶
func ParseSampleHTTPResponse(rsp *http.Response) (*SampleHTTPResponse, error)
ParseSampleHTTPResponse parses an HTTP response from a SampleWithResponse call
func (SampleHTTPResponse) ContentType ¶
func (r SampleHTTPResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (SampleHTTPResponse) GetBody ¶
func (r SampleHTTPResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (SampleHTTPResponse) GetJSON200 ¶
func (r SampleHTTPResponse) GetJSON200() *SampleResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (SampleHTTPResponse) Status ¶
func (r SampleHTTPResponse) Status() string
Status returns HTTPResponse.Status
func (SampleHTTPResponse) StatusCode ¶
func (r SampleHTTPResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SampleJSONRequestBody ¶
type SampleJSONRequestBody = SampleRequest
SampleJSONRequestBody defines body for Sample for application/json ContentType.
type SampleRequest ¶
type SampleRequest struct {
// BaseModel Optional base model name to sample from. Is inferred from model_path, if provided. If sampling against a base model, this is required.
BaseModel *string `json:"base_model,omitempty"`
// ModelPath Optional tinker:// path to your model weights or LoRA weights. If not provided, samples against the base model.
ModelPath *string `json:"model_path,omitempty"`
// NumSamples Number of samples to generate
NumSamples int32 `json:"num_samples"`
Prompt ModelInput `json:"prompt"`
// PromptLogprobs If set to `true`, computes and returns logprobs on the prompt tokens. Defaults to false.
PromptLogprobs *bool `json:"prompt_logprobs,omitempty"`
SamplingParams SamplingParams `json:"sampling_params"`
Type *SampleRequestType `json:"type,omitempty"`
}
SampleRequest defines model for SampleRequest.
type SampleRequestType ¶
type SampleRequestType string
SampleRequestType defines model for SampleRequest.Type.
const (
SampleRequestTypeSample SampleRequestType = "sample"
)
Defines values for SampleRequestType.
func (SampleRequestType) Valid ¶
func (e SampleRequestType) Valid() bool
Valid indicates whether the value is a known member of the SampleRequestType enum.
type SampleResponse ¶
type SampleResponse struct {
// PromptLogprobs If prompt_logprobs was set to true in the request, logprobs are computed for every token in the prompt. The `prompt_logprobs` response contains a float32 value for every token in the prompt.
PromptLogprobs *[]*float64 `json:"prompt_logprobs,omitempty"`
Sequences []SampledSequence `json:"sequences"`
Type SampleResponseType `json:"type"`
}
SampleResponse defines model for SampleResponse.
type SampleResponseType ¶
type SampleResponseType string
SampleResponseType defines model for SampleResponse.Type.
const (
SampleResponseTypeSample SampleResponseType = "sample"
)
Defines values for SampleResponseType.
func (SampleResponseType) Valid ¶
func (e SampleResponseType) Valid() bool
Valid indicates whether the value is a known member of the SampleResponseType enum.
type SampledSequence ¶
type SampledSequence struct {
// Logprobs Log probabilities for each token (optional)
Logprobs *[]float64 `json:"logprobs,omitempty"`
// StopReason Reason why sampling stopped
StopReason StopReason `json:"stop_reason"`
// Tokens List of generated token IDs
Tokens []int32 `json:"tokens"`
}
SampledSequence defines model for SampledSequence.
type SamplingParams ¶
type SamplingParams struct {
// MaxTokens Maximum number of tokens to generate
MaxTokens *int32 `json:"max_tokens,omitempty"`
// Seed Random seed for reproducible generation
Seed *int32 `json:"seed,omitempty"`
// Stop Stop sequences for generation
Stop *SamplingParams_Stop `json:"stop,omitempty"`
// Temperature Sampling temperature
Temperature *float64 `json:"temperature,omitempty"`
// TopK Top-k sampling parameter (-1 for no limit)
TopK *int32 `json:"top_k,omitempty"`
// TopP Nucleus sampling probability
TopP *float64 `json:"top_p,omitempty"`
}
SamplingParams defines model for SamplingParams.
type SamplingParamsStop0 ¶
type SamplingParamsStop0 = string
SamplingParamsStop0 defines model for SamplingParams.Stop.0.
type SamplingParamsStop1 ¶
type SamplingParamsStop1 = []string
SamplingParamsStop1 defines model for SamplingParams.Stop.1.
type SamplingParamsStop2 ¶
type SamplingParamsStop2 = []int32
SamplingParamsStop2 defines model for SamplingParams.Stop.2.
type SamplingParams_Stop ¶
type SamplingParams_Stop struct {
// contains filtered or unexported fields
}
SamplingParams_Stop Stop sequences for generation
func (SamplingParams_Stop) AsSamplingParamsStop0 ¶
func (t SamplingParams_Stop) AsSamplingParamsStop0() (SamplingParamsStop0, error)
AsSamplingParamsStop0 returns the union data inside the SamplingParams_Stop as a SamplingParamsStop0
func (SamplingParams_Stop) AsSamplingParamsStop1 ¶
func (t SamplingParams_Stop) AsSamplingParamsStop1() (SamplingParamsStop1, error)
AsSamplingParamsStop1 returns the union data inside the SamplingParams_Stop as a SamplingParamsStop1
func (SamplingParams_Stop) AsSamplingParamsStop2 ¶
func (t SamplingParams_Stop) AsSamplingParamsStop2() (SamplingParamsStop2, error)
AsSamplingParamsStop2 returns the union data inside the SamplingParams_Stop as a SamplingParamsStop2
func (*SamplingParams_Stop) FromSamplingParamsStop0 ¶
func (t *SamplingParams_Stop) FromSamplingParamsStop0(v SamplingParamsStop0) error
FromSamplingParamsStop0 overwrites any union data inside the SamplingParams_Stop as the provided SamplingParamsStop0
func (*SamplingParams_Stop) FromSamplingParamsStop1 ¶
func (t *SamplingParams_Stop) FromSamplingParamsStop1(v SamplingParamsStop1) error
FromSamplingParamsStop1 overwrites any union data inside the SamplingParams_Stop as the provided SamplingParamsStop1
func (*SamplingParams_Stop) FromSamplingParamsStop2 ¶
func (t *SamplingParams_Stop) FromSamplingParamsStop2(v SamplingParamsStop2) error
FromSamplingParamsStop2 overwrites any union data inside the SamplingParams_Stop as the provided SamplingParamsStop2
func (SamplingParams_Stop) MarshalJSON ¶
func (t SamplingParams_Stop) MarshalJSON() ([]byte, error)
func (*SamplingParams_Stop) MergeSamplingParamsStop0 ¶
func (t *SamplingParams_Stop) MergeSamplingParamsStop0(v SamplingParamsStop0) error
MergeSamplingParamsStop0 performs a merge with any union data inside the SamplingParams_Stop, using the provided SamplingParamsStop0
func (*SamplingParams_Stop) MergeSamplingParamsStop1 ¶
func (t *SamplingParams_Stop) MergeSamplingParamsStop1(v SamplingParamsStop1) error
MergeSamplingParamsStop1 performs a merge with any union data inside the SamplingParams_Stop, using the provided SamplingParamsStop1
func (*SamplingParams_Stop) MergeSamplingParamsStop2 ¶
func (t *SamplingParams_Stop) MergeSamplingParamsStop2(v SamplingParamsStop2) error
MergeSamplingParamsStop2 performs a merge with any union data inside the SamplingParams_Stop, using the provided SamplingParamsStop2
func (*SamplingParams_Stop) UnmarshalJSON ¶
func (t *SamplingParams_Stop) UnmarshalJSON(b []byte) error
type SaveWeightsForSamplerHTTPResponse ¶
type SaveWeightsForSamplerHTTPResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *UntypedAPIFuture
}
func ParseSaveWeightsForSamplerHTTPResponse ¶
func ParseSaveWeightsForSamplerHTTPResponse(rsp *http.Response) (*SaveWeightsForSamplerHTTPResponse, error)
ParseSaveWeightsForSamplerHTTPResponse parses an HTTP response from a SaveWeightsForSamplerWithResponse call
func (SaveWeightsForSamplerHTTPResponse) ContentType ¶
func (r SaveWeightsForSamplerHTTPResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (SaveWeightsForSamplerHTTPResponse) GetBody ¶
func (r SaveWeightsForSamplerHTTPResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (SaveWeightsForSamplerHTTPResponse) GetJSON200 ¶
func (r SaveWeightsForSamplerHTTPResponse) GetJSON200() *UntypedAPIFuture
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (SaveWeightsForSamplerHTTPResponse) Status ¶
func (r SaveWeightsForSamplerHTTPResponse) Status() string
Status returns HTTPResponse.Status
func (SaveWeightsForSamplerHTTPResponse) StatusCode ¶
func (r SaveWeightsForSamplerHTTPResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SaveWeightsForSamplerJSONRequestBody ¶
type SaveWeightsForSamplerJSONRequestBody = SaveWeightsForSamplerRequest
SaveWeightsForSamplerJSONRequestBody defines body for SaveWeightsForSampler for application/json ContentType.
type SaveWeightsForSamplerRequest ¶
type SaveWeightsForSamplerRequest struct {
// ModelId Example: 123e4567-e89b-12d3-a456-426614174000
ModelId ModelId `json:"model_id"`
// Path A file/directory name for the weights
//
// Example: For the tinker path 'tinker://model-id/weights/step-0123', the WeightsLabel would be 'step-0123'
Path *TinkerWeightsLabel `json:"path,omitempty"`
Type *SaveWeightsForSamplerRequestType `json:"type,omitempty"`
}
SaveWeightsForSamplerRequest defines model for SaveWeightsForSamplerRequest.
type SaveWeightsForSamplerRequestType ¶
type SaveWeightsForSamplerRequestType string
SaveWeightsForSamplerRequestType defines model for SaveWeightsForSamplerRequest.Type.
const (
SaveWeightsForSamplerRequestTypeSaveWeightsForSampler SaveWeightsForSamplerRequestType = "save_weights_for_sampler"
)
Defines values for SaveWeightsForSamplerRequestType.
func (SaveWeightsForSamplerRequestType) Valid ¶
func (e SaveWeightsForSamplerRequestType) Valid() bool
Valid indicates whether the value is a known member of the SaveWeightsForSamplerRequestType enum.
type SaveWeightsForSamplerResponse ¶
type SaveWeightsForSamplerResponse struct {
// Path A tinker URI for model weights for sampling at a specific step
//
// Example: tinker://model-id/sampler_weights/step-0123
Path *TinkerSamplerWeightsPath `json:"path,omitempty"`
Type *SaveWeightsForSamplerResponseType `json:"type,omitempty"`
}
SaveWeightsForSamplerResponse defines model for SaveWeightsForSamplerResponse.
type SaveWeightsForSamplerResponseType ¶
type SaveWeightsForSamplerResponseType string
SaveWeightsForSamplerResponseType defines model for SaveWeightsForSamplerResponse.Type.
const (
SaveWeightsForSamplerResponseTypeSaveWeightsForSampler SaveWeightsForSamplerResponseType = "save_weights_for_sampler"
)
Defines values for SaveWeightsForSamplerResponseType.
func (SaveWeightsForSamplerResponseType) Valid ¶
func (e SaveWeightsForSamplerResponseType) Valid() bool
Valid indicates whether the value is a known member of the SaveWeightsForSamplerResponseType enum.
type SaveWeightsHTTPResponse ¶
type SaveWeightsHTTPResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *UntypedAPIFuture
}
func ParseSaveWeightsHTTPResponse ¶
func ParseSaveWeightsHTTPResponse(rsp *http.Response) (*SaveWeightsHTTPResponse, error)
ParseSaveWeightsHTTPResponse parses an HTTP response from a SaveWeightsWithResponse call
func (SaveWeightsHTTPResponse) ContentType ¶
func (r SaveWeightsHTTPResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (SaveWeightsHTTPResponse) GetBody ¶
func (r SaveWeightsHTTPResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (SaveWeightsHTTPResponse) GetJSON200 ¶
func (r SaveWeightsHTTPResponse) GetJSON200() *UntypedAPIFuture
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (SaveWeightsHTTPResponse) Status ¶
func (r SaveWeightsHTTPResponse) Status() string
Status returns HTTPResponse.Status
func (SaveWeightsHTTPResponse) StatusCode ¶
func (r SaveWeightsHTTPResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SaveWeightsJSONRequestBody ¶
type SaveWeightsJSONRequestBody = SaveWeightsRequest
SaveWeightsJSONRequestBody defines body for SaveWeights for application/json ContentType.
type SaveWeightsRequest ¶
type SaveWeightsRequest struct {
// ModelId Example: 123e4567-e89b-12d3-a456-426614174000
ModelId ModelId `json:"model_id"`
// Path A file/directory name for the weights
//
// Example: For the tinker path 'tinker://model-id/weights/step-0123', the WeightsLabel would be 'step-0123'
Path *TinkerWeightsLabel `json:"path,omitempty"`
Type *SaveWeightsRequestType `json:"type,omitempty"`
}
SaveWeightsRequest defines model for SaveWeightsRequest.
type SaveWeightsRequestType ¶
type SaveWeightsRequestType string
SaveWeightsRequestType defines model for SaveWeightsRequest.Type.
const (
SaveWeightsRequestTypeSaveWeights SaveWeightsRequestType = "save_weights"
)
Defines values for SaveWeightsRequestType.
func (SaveWeightsRequestType) Valid ¶
func (e SaveWeightsRequestType) Valid() bool
Valid indicates whether the value is a known member of the SaveWeightsRequestType enum.
type SaveWeightsResponse ¶
type SaveWeightsResponse struct {
// Path A tinker URI for model weights at a specific step
//
// Example: tinker://model-id/weights/step-0123
Path TinkerWeightsPath `json:"path"`
Type *SaveWeightsResponseType `json:"type,omitempty"`
}
SaveWeightsResponse defines model for SaveWeightsResponse.
type SaveWeightsResponseType ¶
type SaveWeightsResponseType string
SaveWeightsResponseType defines model for SaveWeightsResponse.Type.
const (
SaveWeightsResponseTypeSaveWeights SaveWeightsResponseType = "save_weights"
)
Defines values for SaveWeightsResponseType.
func (SaveWeightsResponseType) Valid ¶
func (e SaveWeightsResponseType) Valid() bool
Valid indicates whether the value is a known member of the SaveWeightsResponseType enum.
type SessionEndEvent ¶
type SessionEndEvent struct {
// Duration ISO 8601 duration string
//
// Example: PT1H30M
Duration string `json:"duration"`
// Event Telemetry event type
Event EventType `json:"event"`
EventId openapi_types.UUID `json:"event_id"`
EventSessionIndex int32 `json:"event_session_index"`
// Severity Log severity level
Severity Severity `json:"severity"`
Timestamp time.Time `json:"timestamp"`
}
SessionEndEvent defines model for SessionEndEvent.
type SessionStartEvent ¶
type SessionStartEvent struct {
// Event Telemetry event type
Event EventType `json:"event"`
EventId openapi_types.UUID `json:"event_id"`
EventSessionIndex int32 `json:"event_session_index"`
// Severity Log severity level
Severity Severity `json:"severity"`
Timestamp time.Time `json:"timestamp"`
}
SessionStartEvent defines model for SessionStartEvent.
type Severity ¶
type Severity string
Severity Log severity level
type StopReason ¶
type StopReason string
StopReason Reason why sampling stopped
const ( StopReasonLength StopReason = "length" StopReasonStop StopReason = "stop" )
Defines values for StopReason.
func (StopReason) Valid ¶
func (e StopReason) Valid() bool
Valid indicates whether the value is a known member of the StopReason enum.
type TelemetryBatch ¶
type TelemetryBatch struct {
Events []TelemetryEvent `json:"events"`
// Platform Host platform name
//
// Example: Linux
Platform string `json:"platform"`
// SdkVersion SDK version string
//
// Example: 1.2.3
SdkVersion string `json:"sdk_version"`
SessionId openapi_types.UUID `json:"session_id"`
}
TelemetryBatch defines model for TelemetryBatch.
type TelemetryEvent ¶
type TelemetryEvent struct {
// contains filtered or unexported fields
}
TelemetryEvent defines model for TelemetryEvent.
func (TelemetryEvent) AsSessionEndEvent ¶
func (t TelemetryEvent) AsSessionEndEvent() (SessionEndEvent, error)
AsSessionEndEvent returns the union data inside the TelemetryEvent as a SessionEndEvent
func (TelemetryEvent) AsSessionStartEvent ¶
func (t TelemetryEvent) AsSessionStartEvent() (SessionStartEvent, error)
AsSessionStartEvent returns the union data inside the TelemetryEvent as a SessionStartEvent
func (TelemetryEvent) AsUnhandledExceptionEvent ¶
func (t TelemetryEvent) AsUnhandledExceptionEvent() (UnhandledExceptionEvent, error)
AsUnhandledExceptionEvent returns the union data inside the TelemetryEvent as a UnhandledExceptionEvent
func (TelemetryEvent) Discriminator ¶
func (t TelemetryEvent) Discriminator() (string, error)
func (*TelemetryEvent) FromSessionEndEvent ¶
func (t *TelemetryEvent) FromSessionEndEvent(v SessionEndEvent) error
FromSessionEndEvent overwrites any union data inside the TelemetryEvent as the provided SessionEndEvent
func (*TelemetryEvent) FromSessionStartEvent ¶
func (t *TelemetryEvent) FromSessionStartEvent(v SessionStartEvent) error
FromSessionStartEvent overwrites any union data inside the TelemetryEvent as the provided SessionStartEvent
func (*TelemetryEvent) FromUnhandledExceptionEvent ¶
func (t *TelemetryEvent) FromUnhandledExceptionEvent(v UnhandledExceptionEvent) error
FromUnhandledExceptionEvent overwrites any union data inside the TelemetryEvent as the provided UnhandledExceptionEvent
func (TelemetryEvent) MarshalJSON ¶
func (t TelemetryEvent) MarshalJSON() ([]byte, error)
func (*TelemetryEvent) MergeSessionEndEvent ¶
func (t *TelemetryEvent) MergeSessionEndEvent(v SessionEndEvent) error
MergeSessionEndEvent performs a merge with any union data inside the TelemetryEvent, using the provided SessionEndEvent
func (*TelemetryEvent) MergeSessionStartEvent ¶
func (t *TelemetryEvent) MergeSessionStartEvent(v SessionStartEvent) error
MergeSessionStartEvent performs a merge with any union data inside the TelemetryEvent, using the provided SessionStartEvent
func (*TelemetryEvent) MergeUnhandledExceptionEvent ¶
func (t *TelemetryEvent) MergeUnhandledExceptionEvent(v UnhandledExceptionEvent) error
MergeUnhandledExceptionEvent performs a merge with any union data inside the TelemetryEvent, using the provided UnhandledExceptionEvent
func (*TelemetryEvent) UnmarshalJSON ¶
func (t *TelemetryEvent) UnmarshalJSON(b []byte) error
func (TelemetryEvent) ValueByDiscriminator ¶
func (t TelemetryEvent) ValueByDiscriminator() (interface{}, error)
type TelemetryResponse ¶
type TelemetryResponse struct {
// Status Example: accepted
Status TelemetryResponseStatus `json:"status"`
}
TelemetryResponse defines model for TelemetryResponse.
type TelemetryResponseStatus ¶
type TelemetryResponseStatus string
TelemetryResponseStatus Example: accepted
const (
TelemetryResponseStatusAccepted TelemetryResponseStatus = "accepted"
)
Defines values for TelemetryResponseStatus.
func (TelemetryResponseStatus) Valid ¶
func (e TelemetryResponseStatus) Valid() bool
Valid indicates whether the value is a known member of the TelemetryResponseStatus enum.
type TensorDType ¶
type TensorDType string
TensorDType defines model for TensorDType.
const ( TensorDTypeFloat32 TensorDType = "float32" TensorDTypeInt64 TensorDType = "int64" )
Defines values for TensorDType.
func (TensorDType) Valid ¶
func (e TensorDType) Valid() bool
Valid indicates whether the value is a known member of the TensorDType enum.
type TensorData ¶
type TensorData struct {
// Data Flattened tensor data as array of numbers.
Data TensorData_Data `json:"data"`
Dtype TensorDType `json:"dtype"`
// Shape Optional. The shape of the tensor (see PyTorch tensor.shape). The shape of a one-dimensional list of length N is `(N,)`. Can usually be inferred if not provided, and is generally inferred as a 1D tensor.
//
// Example: [10]
Shape *[]int `json:"shape,omitempty"`
}
TensorData defines model for TensorData.
type TensorDataData0 ¶
type TensorDataData0 = []int
TensorDataData0 defines model for TensorData.Data.0.
type TensorDataData1 ¶
type TensorDataData1 = []float64
TensorDataData1 defines model for TensorData.Data.1.
type TensorData_Data ¶
type TensorData_Data struct {
// contains filtered or unexported fields
}
TensorData_Data Flattened tensor data as array of numbers.
func (TensorData_Data) AsTensorDataData0 ¶
func (t TensorData_Data) AsTensorDataData0() (TensorDataData0, error)
AsTensorDataData0 returns the union data inside the TensorData_Data as a TensorDataData0
func (TensorData_Data) AsTensorDataData1 ¶
func (t TensorData_Data) AsTensorDataData1() (TensorDataData1, error)
AsTensorDataData1 returns the union data inside the TensorData_Data as a TensorDataData1
func (*TensorData_Data) FromTensorDataData0 ¶
func (t *TensorData_Data) FromTensorDataData0(v TensorDataData0) error
FromTensorDataData0 overwrites any union data inside the TensorData_Data as the provided TensorDataData0
func (*TensorData_Data) FromTensorDataData1 ¶
func (t *TensorData_Data) FromTensorDataData1(v TensorDataData1) error
FromTensorDataData1 overwrites any union data inside the TensorData_Data as the provided TensorDataData1
func (TensorData_Data) MarshalJSON ¶
func (t TensorData_Data) MarshalJSON() ([]byte, error)
func (*TensorData_Data) MergeTensorDataData0 ¶
func (t *TensorData_Data) MergeTensorDataData0(v TensorDataData0) error
MergeTensorDataData0 performs a merge with any union data inside the TensorData_Data, using the provided TensorDataData0
func (*TensorData_Data) MergeTensorDataData1 ¶
func (t *TensorData_Data) MergeTensorDataData1(v TensorDataData1) error
MergeTensorDataData1 performs a merge with any union data inside the TensorData_Data, using the provided TensorDataData1
func (*TensorData_Data) UnmarshalJSON ¶
func (t *TensorData_Data) UnmarshalJSON(b []byte) error
type TinkerSamplerWeightsPath ¶
type TinkerSamplerWeightsPath = string
TinkerSamplerWeightsPath A tinker URI for model weights for sampling at a specific step
Example: tinker://model-id/sampler_weights/step-0123
type TinkerWeightsLabel ¶
type TinkerWeightsLabel = string
TinkerWeightsLabel A file/directory name for the weights
Example: For the tinker path 'tinker://model-id/weights/step-0123', the WeightsLabel would be 'step-0123'
type TinkerWeightsPath ¶
type TinkerWeightsPath = string
TinkerWeightsPath A tinker URI for model weights at a specific step
Example: tinker://model-id/weights/step-0123
type TryAgainResponse ¶
type TryAgainResponse struct {
// RequestId Request ID that is still pending
RequestId string `json:"request_id"`
Type TryAgainResponseType `json:"type"`
}
TryAgainResponse This response is sent when the client has waited for too long and the request they're waiting for is still pending. Client should retry the retrieve_future request.
type TryAgainResponseType ¶
type TryAgainResponseType string
TryAgainResponseType defines model for TryAgainResponse.Type.
const (
TryAgainResponseTypeTryAgain TryAgainResponseType = "try_again"
)
Defines values for TryAgainResponseType.
func (TryAgainResponseType) Valid ¶
func (e TryAgainResponseType) Valid() bool
Valid indicates whether the value is a known member of the TryAgainResponseType enum.
type UnhandledExceptionEvent ¶
type UnhandledExceptionEvent struct {
ErrorMessage string `json:"error_message"`
ErrorType string `json:"error_type"`
// Event Telemetry event type
Event EventType `json:"event"`
EventId openapi_types.UUID `json:"event_id"`
EventSessionIndex int32 `json:"event_session_index"`
// Severity Log severity level
Severity Severity `json:"severity"`
Timestamp time.Time `json:"timestamp"`
// Traceback Optional Python traceback string
Traceback *string `json:"traceback,omitempty"`
}
UnhandledExceptionEvent defines model for UnhandledExceptionEvent.
type UnloadModelHTTPResponse ¶
type UnloadModelHTTPResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *UntypedAPIFuture
}
func ParseUnloadModelHTTPResponse ¶
func ParseUnloadModelHTTPResponse(rsp *http.Response) (*UnloadModelHTTPResponse, error)
ParseUnloadModelHTTPResponse parses an HTTP response from a UnloadModelWithResponse call
func (UnloadModelHTTPResponse) ContentType ¶
func (r UnloadModelHTTPResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UnloadModelHTTPResponse) GetBody ¶
func (r UnloadModelHTTPResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (UnloadModelHTTPResponse) GetJSON200 ¶
func (r UnloadModelHTTPResponse) GetJSON200() *UntypedAPIFuture
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (UnloadModelHTTPResponse) Status ¶
func (r UnloadModelHTTPResponse) Status() string
Status returns HTTPResponse.Status
func (UnloadModelHTTPResponse) StatusCode ¶
func (r UnloadModelHTTPResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UnloadModelJSONRequestBody ¶
type UnloadModelJSONRequestBody = UnloadModelRequest
UnloadModelJSONRequestBody defines body for UnloadModel for application/json ContentType.
type UnloadModelRequest ¶
type UnloadModelRequest struct {
// ModelId Example: 123e4567-e89b-12d3-a456-426614174000
ModelId ModelId `json:"model_id"`
Type *UnloadModelRequestType `json:"type,omitempty"`
}
UnloadModelRequest defines model for UnloadModelRequest.
type UnloadModelRequestType ¶
type UnloadModelRequestType string
UnloadModelRequestType defines model for UnloadModelRequest.Type.
const (
UnloadModelRequestTypeUnloadModel UnloadModelRequestType = "unload_model"
)
Defines values for UnloadModelRequestType.
func (UnloadModelRequestType) Valid ¶
func (e UnloadModelRequestType) Valid() bool
Valid indicates whether the value is a known member of the UnloadModelRequestType enum.
type UnloadModelResponse ¶
type UnloadModelResponse struct {
// ModelId Example: 123e4567-e89b-12d3-a456-426614174000
ModelId ModelId `json:"model_id"`
Type *UnloadModelResponseType `json:"type,omitempty"`
}
UnloadModelResponse defines model for UnloadModelResponse.
type UnloadModelResponseType ¶
type UnloadModelResponseType string
UnloadModelResponseType defines model for UnloadModelResponse.Type.
const (
UnloadModelResponseTypeUnloadModel UnloadModelResponseType = "unload_model"
)
Defines values for UnloadModelResponseType.
func (UnloadModelResponseType) Valid ¶
func (e UnloadModelResponseType) Valid() bool
Valid indicates whether the value is a known member of the UnloadModelResponseType enum.
type UntypedAPIFuture ¶
type UntypedAPIFuture struct {
// ModelId Example: 123e4567-e89b-12d3-a456-426614174000
ModelId *ModelId `json:"model_id,omitempty"`
// RequestId Example: 123e4567-e89b-12d3-a456-426614174000
RequestId RequestId `json:"request_id"`
}
UntypedAPIFuture defines model for UntypedAPIFuture.