Documentation
¶
Index ¶
- Constants
- type AIRunParams
- type AIRunParamsBody
- type AIRunParamsBodyAutomaticSpeechRecognition
- type AIRunParamsBodyImageClassification
- type AIRunParamsBodyImageTextToText
- type AIRunParamsBodyImageTextToTextMessage
- type AIRunParamsBodyImageToText
- type AIRunParamsBodyMultimodalEmbeddings
- type AIRunParamsBodyObject
- type AIRunParamsBodyObjectDetection
- type AIRunParamsBodyPrompt
- type AIRunParamsBodyPromptResponseFormat
- type AIRunParamsBodyPromptResponseFormatType
- type AIRunParamsBodySummarization
- type AIRunParamsBodyTextClassification
- type AIRunParamsBodyTextEmbeddings
- type AIRunParamsBodyTextEmbeddingsTextArray
- type AIRunParamsBodyTextEmbeddingsTextUnion
- type AIRunParamsBodyTextGeneration
- type AIRunParamsBodyTextGenerationFunction
- type AIRunParamsBodyTextGenerationMessage
- type AIRunParamsBodyTextGenerationResponseFormat
- type AIRunParamsBodyTextGenerationResponseFormatType
- type AIRunParamsBodyTextGenerationTool
- type AIRunParamsBodyTextGenerationToolUnion
- type AIRunParamsBodyTextGenerationToolsFunction
- type AIRunParamsBodyTextGenerationToolsFunctionFunction
- type AIRunParamsBodyTextGenerationToolsFunctionFunctionParameters
- type AIRunParamsBodyTextGenerationToolsFunctionFunctionParametersProperties
- type AIRunParamsBodyTextGenerationToolsObject
- type AIRunParamsBodyTextGenerationToolsObjectParameters
- type AIRunParamsBodyTextGenerationToolsObjectParametersProperties
- type AIRunParamsBodyTextToImage
- type AIRunParamsBodyTextToSpeech
- type AIRunParamsBodyTranslation
- type AIRunParamsBodyUnion
- type AIRunResponseAudio
- type AIRunResponseAutomaticSpeechRecognition
- type AIRunResponseAutomaticSpeechRecognitionWord
- type AIRunResponseEnvelope
- type AIRunResponseImageClassification
- type AIRunResponseImageClassificationItem
- type AIRunResponseImageTextToText
- type AIRunResponseImageToText
- type AIRunResponseMultimodalEmbeddings
- type AIRunResponseObject
- type AIRunResponseObjectDetection
- type AIRunResponseObjectDetectionBox
- type AIRunResponseObjectDetectionItem
- type AIRunResponseObjectToolCall
- type AIRunResponseObjectUsage
- type AIRunResponseSummarization
- type AIRunResponseTextClassification
- type AIRunResponseTextClassificationItem
- type AIRunResponseTextEmbeddings
- type AIRunResponseTranslation
- type AIRunResponseUnion
- type AIService
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type AuthorListParams
- type AuthorListResponse
- type AuthorService
- func (r *AuthorService) List(ctx context.Context, query AuthorListParams, opts ...option.RequestOption) (res *pagination.SinglePage[AuthorListResponse], err error)
- func (r *AuthorService) ListAutoPaging(ctx context.Context, query AuthorListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[AuthorListResponse]
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConfigSrc
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type Error
- type ErrorData
- type ErrorDataSource
- type FinetuneAssetNewParams
- type FinetuneAssetNewResponse
- type FinetuneAssetService
- type FinetuneListParams
- type FinetuneListResponse
- type FinetuneListResponseEnvelope
- type FinetuneNewParams
- type FinetuneNewResponse
- type FinetuneNewResponseEnvelope
- type FinetunePublicListParams
- type FinetunePublicListResponse
- type FinetunePublicService
- func (r *FinetunePublicService) List(ctx context.Context, params FinetunePublicListParams, ...) (res *pagination.SinglePage[FinetunePublicListResponse], err error)
- func (r *FinetunePublicService) ListAutoPaging(ctx context.Context, params FinetunePublicListParams, ...) *pagination.SinglePageAutoPager[FinetunePublicListResponse]
- type FinetuneService
- type Member
- type MemberPoliciesAccess
- type MemberPoliciesPermissionGroup
- type MemberPoliciesPermissionGroupsMeta
- type MemberPoliciesResourceGroup
- type MemberPoliciesResourceGroupsMeta
- type MemberPoliciesResourceGroupsScope
- type MemberPoliciesResourceGroupsScopeObject
- type MemberPolicy
- type MemberStatus
- type MemberUser
- type ModelListParams
- type ModelListResponse
- type ModelSchemaGetParams
- type ModelSchemaGetResponse
- type ModelSchemaGetResponseEnvelope
- type ModelSchemaService
- type ModelService
- func (r *ModelService) List(ctx context.Context, params ModelListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[ModelListResponse], err error)
- func (r *ModelService) ListAutoPaging(ctx context.Context, params ModelListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[ModelListResponse]
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type RatePlan
- type RatePlanID
- type RatePlanParam
- type ResponseInfo
- type ResponseInfoSource
- type Role
- type RoleParam
- type RolePermissions
- type RolePermissionsParam
- type SortDirection
- type Subscription
- type SubscriptionFrequency
- type SubscriptionParam
- type SubscriptionState
- type TaskListParams
- type TaskListResponse
- type TaskService
- func (r *TaskService) List(ctx context.Context, query TaskListParams, opts ...option.RequestOption) (res *pagination.SinglePage[TaskListResponse], err error)
- func (r *TaskService) ListAutoPaging(ctx context.Context, query TaskListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[TaskListResponse]
- type ToMarkdownService
- func (r *ToMarkdownService) Supported(ctx context.Context, query ToMarkdownSupportedParams, ...) (res *pagination.SinglePage[ToMarkdownSupportedResponse], err error)
- func (r *ToMarkdownService) SupportedAutoPaging(ctx context.Context, query ToMarkdownSupportedParams, ...) *pagination.SinglePageAutoPager[ToMarkdownSupportedResponse]
- func (r *ToMarkdownService) Transform(ctx context.Context, params ToMarkdownTransformParams, ...) (res *pagination.SinglePage[ToMarkdownTransformResponse], err error)
- func (r *ToMarkdownService) TransformAutoPaging(ctx context.Context, params ToMarkdownTransformParams, ...) *pagination.SinglePageAutoPager[ToMarkdownTransformResponse]
- type ToMarkdownSupportedParams
- type ToMarkdownSupportedResponse
- type ToMarkdownTransformParams
- type ToMarkdownTransformParamsFile
- type ToMarkdownTransformResponse
- type Token
- type TokenCondition
- type TokenConditionCIDRList
- type TokenConditionCIDRListParam
- type TokenConditionParam
- type TokenConditionRequestIP
- type TokenConditionRequestIPParam
- type TokenParam
- type TokenPolicy
- type TokenPolicyEffect
- type TokenPolicyParam
- type TokenPolicyPermissionGroup
- type TokenPolicyPermissionGroupParam
- type TokenPolicyPermissionGroupsMeta
- type TokenPolicyPermissionGroupsMetaParam
- type TokenPolicyResourcesIAMResourcesTypeObjectNested
- type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam
- type TokenPolicyResourcesIAMResourcesTypeObjectString
- type TokenPolicyResourcesIAMResourcesTypeObjectStringParam
- type TokenPolicyResourcesUnion
- type TokenPolicyResourcesUnionParam
- type TokenStatus
- type TokenValue
Constants ¶
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin
This is an alias to an internal value.
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare
This is an alias to an internal value.
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser
This is an alias to an internal value.
const CertificateCADigicert = shared.CertificateCADigicert
This is an alias to an internal value.
const CertificateCAGoogle = shared.CertificateCAGoogle
This is an alias to an internal value.
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt
This is an alias to an internal value.
const CertificateCASSLCom = shared.CertificateCASSLCom
This is an alias to an internal value.
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate
This is an alias to an internal value.
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC
This is an alias to an internal value.
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA
This is an alias to an internal value.
const CloudflareTunnelConfigSrcCloudflare = shared.CloudflareTunnelConfigSrcCloudflare
This is an alias to an internal value.
const CloudflareTunnelConfigSrcLocal = shared.CloudflareTunnelConfigSrcLocal
This is an alias to an internal value.
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded
This is an alias to an internal value.
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown
This is an alias to an internal value.
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy
This is an alias to an internal value.
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive
This is an alias to an internal value.
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
This is an alias to an internal value.
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel
This is an alias to an internal value.
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE
This is an alias to an internal value.
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec
This is an alias to an internal value.
const CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow
This is an alias to an internal value.
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny
This is an alias to an internal value.
const MemberStatusAccepted = shared.MemberStatusAccepted
This is an alias to an internal value.
const MemberStatusPending = shared.MemberStatusPending
This is an alias to an internal value.
const RatePlanIDBusiness = shared.RatePlanIDBusiness
This is an alias to an internal value.
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise
This is an alias to an internal value.
const RatePlanIDFree = shared.RatePlanIDFree
This is an alias to an internal value.
const RatePlanIDLite = shared.RatePlanIDLite
This is an alias to an internal value.
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness
This is an alias to an internal value.
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise
This is an alias to an internal value.
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree
This is an alias to an internal value.
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro
This is an alias to an internal value.
const RatePlanIDPro = shared.RatePlanIDPro
This is an alias to an internal value.
const RatePlanIDProPlus = shared.RatePlanIDProPlus
This is an alias to an internal value.
const SortDirectionAsc = shared.SortDirectionAsc
This is an alias to an internal value.
const SortDirectionDesc = shared.SortDirectionDesc
This is an alias to an internal value.
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly
This is an alias to an internal value.
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly
This is an alias to an internal value.
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly
This is an alias to an internal value.
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly
This is an alias to an internal value.
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment
This is an alias to an internal value.
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled
This is an alias to an internal value.
const SubscriptionStateExpired = shared.SubscriptionStateExpired
This is an alias to an internal value.
const SubscriptionStateFailed = shared.SubscriptionStateFailed
This is an alias to an internal value.
const SubscriptionStatePaid = shared.SubscriptionStatePaid
This is an alias to an internal value.
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned
This is an alias to an internal value.
const SubscriptionStateTrial = shared.SubscriptionStateTrial
This is an alias to an internal value.
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow
This is an alias to an internal value.
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny
This is an alias to an internal value.
const TokenStatusActive = shared.TokenStatusActive
This is an alias to an internal value.
const TokenStatusDisabled = shared.TokenStatusDisabled
This is an alias to an internal value.
const TokenStatusExpired = shared.TokenStatusExpired
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AIRunParams ¶
type AIRunParams struct {
AccountID param.Field[string] `path:"account_id,required"`
Body AIRunParamsBodyUnion `json:"body"`
}
func (AIRunParams) MarshalJSON ¶
func (r AIRunParams) MarshalJSON() (data []byte, err error)
type AIRunParamsBody ¶
type AIRunParamsBody struct {
Audio param.Field[interface{}] `json:"audio"`
// Decreases the likelihood of the model repeating the same lines verbatim.
FrequencyPenalty param.Field[float64] `json:"frequency_penalty"`
Functions param.Field[interface{}] `json:"functions"`
// Controls how closely the generated image should adhere to the prompt; higher
// values make the image more aligned with the prompt
Guidance param.Field[float64] `json:"guidance"`
// The height of the generated image in pixels
Height param.Field[int64] `json:"height"`
// Whether to ignore the EOS token and continue generating tokens after the EOS
// token is generated.
IgnoreEos param.Field[bool] `json:"ignore_eos"`
Image param.Field[interface{}] `json:"image"`
// For use with img2img tasks. A base64-encoded string of the input image
ImageB64 param.Field[string] `json:"image_b64"`
// The text that you want the model to summarize
InputText param.Field[string] `json:"input_text"`
// The speech language (e.g., 'en' for English, 'fr' for French). Defaults to 'en'
// if not specified
Lang param.Field[string] `json:"lang"`
// Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.
Lora param.Field[string] `json:"lora"`
Mask param.Field[interface{}] `json:"mask"`
// The maximum length of the generated summary in tokens
MaxLength param.Field[int64] `json:"max_length"`
// The maximum number of tokens to generate in the response.
MaxTokens param.Field[int64] `json:"max_tokens"`
Messages param.Field[interface{}] `json:"messages"`
// Text describing elements to avoid in the generated image
NegativePrompt param.Field[string] `json:"negative_prompt"`
// The number of diffusion steps; higher values can improve quality but take longer
NumSteps param.Field[int64] `json:"num_steps"`
// Increases the likelihood of the model introducing new topics.
PresencePenalty param.Field[float64] `json:"presence_penalty"`
// A text description of the image you want to generate
Prompt param.Field[string] `json:"prompt"`
// If true, a chat template is not applied and you must adhere to the specific
// model's expected formatting.
Raw param.Field[bool] `json:"raw"`
// Penalty for repeated tokens; higher values discourage repetition.
RepetitionPenalty param.Field[float64] `json:"repetition_penalty"`
ResponseFormat param.Field[interface{}] `json:"response_format"`
Seed param.Field[interface{}] `json:"seed"`
// The language of the recorded audio
SourceLang param.Field[string] `json:"source_lang"`
// If true, the response will be streamed back incrementally using SSE, Server Sent
// Events.
Stream param.Field[bool] `json:"stream"`
// A value between 0 and 1 indicating how strongly to apply the transformation
// during img2img tasks; lower values make the output closer to the input image
Strength param.Field[float64] `json:"strength"`
// The language to translate the transcription into. Currently only English is
// supported.
TargetLang param.Field[string] `json:"target_lang"`
// Controls the randomness of the output; higher values produce more random
// results.
Temperature param.Field[float64] `json:"temperature"`
Text param.Field[interface{}] `json:"text"`
Tools param.Field[interface{}] `json:"tools"`
TopK param.Field[interface{}] `json:"top_k"`
// Adjusts the creativity of the AI's responses by controlling how many possible
// words it considers. Lower values make outputs more predictable; higher values
// allow for more varied and creative responses.
TopP param.Field[float64] `json:"top_p"`
// The width of the generated image in pixels
Width param.Field[int64] `json:"width"`
}
func (AIRunParamsBody) MarshalJSON ¶
func (r AIRunParamsBody) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyAutomaticSpeechRecognition ¶
type AIRunParamsBodyAutomaticSpeechRecognition struct {
// An array of integers that represent the audio data constrained to 8-bit unsigned
// integer values
Audio param.Field[[]float64] `json:"audio,required"`
// The language of the recorded audio
SourceLang param.Field[string] `json:"source_lang"`
// The language to translate the transcription into. Currently only English is
// supported.
TargetLang param.Field[string] `json:"target_lang"`
}
func (AIRunParamsBodyAutomaticSpeechRecognition) MarshalJSON ¶
func (r AIRunParamsBodyAutomaticSpeechRecognition) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyImageClassification ¶
type AIRunParamsBodyImageClassification struct {
// An array of integers that represent the image data constrained to 8-bit unsigned
// integer values
Image param.Field[[]float64] `json:"image,required"`
}
func (AIRunParamsBodyImageClassification) MarshalJSON ¶
func (r AIRunParamsBodyImageClassification) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyImageTextToText ¶
type AIRunParamsBodyImageTextToText struct {
// Image in base64 encoded format.
Image param.Field[string] `json:"image,required"`
// An array of message objects representing the conversation history.
Messages param.Field[[]AIRunParamsBodyImageTextToTextMessage] `json:"messages,required"`
// Decreases the likelihood of the model repeating the same lines verbatim.
FrequencyPenalty param.Field[float64] `json:"frequency_penalty"`
// Whether to ignore the EOS token and continue generating tokens after the EOS
// token is generated.
IgnoreEos param.Field[bool] `json:"ignore_eos"`
// The maximum number of tokens to generate in the response.
MaxTokens param.Field[int64] `json:"max_tokens"`
// Increases the likelihood of the model introducing new topics.
PresencePenalty param.Field[float64] `json:"presence_penalty"`
// Penalty for repeated tokens; higher values discourage repetition.
RepetitionPenalty param.Field[float64] `json:"repetition_penalty"`
// Random seed for reproducibility of the generation.
Seed param.Field[float64] `json:"seed"`
// Controls the randomness of the output; higher values produce more random
// results.
Temperature param.Field[float64] `json:"temperature"`
// Limits the AI to choose from the top 'k' most probable words. Lower values make
// responses more focused; higher values introduce more variety and potential
// surprises.
TopK param.Field[float64] `json:"top_k"`
// Controls the creativity of the AI's responses by adjusting how many possible
// words it considers. Lower values make outputs more predictable; higher values
// allow for more varied and creative responses.
TopP param.Field[float64] `json:"top_p"`
}
func (AIRunParamsBodyImageTextToText) MarshalJSON ¶
func (r AIRunParamsBodyImageTextToText) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyImageTextToTextMessage ¶
type AIRunParamsBodyImageTextToTextMessage struct {
// The content of the message as a string.
Content param.Field[string] `json:"content,required"`
// The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
Role param.Field[string] `json:"role,required"`
}
func (AIRunParamsBodyImageTextToTextMessage) MarshalJSON ¶
func (r AIRunParamsBodyImageTextToTextMessage) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyImageToText ¶
type AIRunParamsBodyImageToText struct {
// An array of integers that represent the image data constrained to 8-bit unsigned
// integer values
Image param.Field[[]float64] `json:"image,required"`
// Decreases the likelihood of the model repeating the same lines verbatim.
FrequencyPenalty param.Field[float64] `json:"frequency_penalty"`
// The maximum number of tokens to generate in the response.
MaxTokens param.Field[int64] `json:"max_tokens"`
// Increases the likelihood of the model introducing new topics.
PresencePenalty param.Field[float64] `json:"presence_penalty"`
// The input text prompt for the model to generate a response.
Prompt param.Field[string] `json:"prompt"`
// If true, a chat template is not applied and you must adhere to the specific
// model's expected formatting.
Raw param.Field[bool] `json:"raw"`
// Penalty for repeated tokens; higher values discourage repetition.
RepetitionPenalty param.Field[float64] `json:"repetition_penalty"`
// Random seed for reproducibility of the generation.
Seed param.Field[float64] `json:"seed"`
// Controls the randomness of the output; higher values produce more random
// results.
Temperature param.Field[float64] `json:"temperature"`
// Limits the AI to choose from the top 'k' most probable words. Lower values make
// responses more focused; higher values introduce more variety and potential
// surprises.
TopK param.Field[float64] `json:"top_k"`
// Controls the creativity of the AI's responses by adjusting how many possible
// words it considers. Lower values make outputs more predictable; higher values
// allow for more varied and creative responses.
TopP param.Field[float64] `json:"top_p"`
}
func (AIRunParamsBodyImageToText) MarshalJSON ¶
func (r AIRunParamsBodyImageToText) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyMultimodalEmbeddings ¶
type AIRunParamsBodyMultimodalEmbeddings struct {
// Image in base64 encoded format.
Image param.Field[string] `json:"image"`
Text param.Field[[]string] `json:"text"`
}
func (AIRunParamsBodyMultimodalEmbeddings) MarshalJSON ¶
func (r AIRunParamsBodyMultimodalEmbeddings) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyObject ¶
type AIRunParamsBodyObject struct {
// Image in base64 encoded format.
Image param.Field[string] `json:"image,required"`
// The input text prompt for the model to generate a response.
Prompt param.Field[string] `json:"prompt,required"`
// Decreases the likelihood of the model repeating the same lines verbatim.
FrequencyPenalty param.Field[float64] `json:"frequency_penalty"`
// Whether to ignore the EOS token and continue generating tokens after the EOS
// token is generated.
IgnoreEos param.Field[bool] `json:"ignore_eos"`
// The maximum number of tokens to generate in the response.
MaxTokens param.Field[int64] `json:"max_tokens"`
// Increases the likelihood of the model introducing new topics.
PresencePenalty param.Field[float64] `json:"presence_penalty"`
// Penalty for repeated tokens; higher values discourage repetition.
RepetitionPenalty param.Field[float64] `json:"repetition_penalty"`
// Random seed for reproducibility of the generation.
Seed param.Field[float64] `json:"seed"`
// Controls the randomness of the output; higher values produce more random
// results.
Temperature param.Field[float64] `json:"temperature"`
// Limits the AI to choose from the top 'k' most probable words. Lower values make
// responses more focused; higher values introduce more variety and potential
// surprises.
TopK param.Field[float64] `json:"top_k"`
// Controls the creativity of the AI's responses by adjusting how many possible
// words it considers. Lower values make outputs more predictable; higher values
// allow for more varied and creative responses.
TopP param.Field[float64] `json:"top_p"`
}
func (AIRunParamsBodyObject) MarshalJSON ¶
func (r AIRunParamsBodyObject) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyObjectDetection ¶
type AIRunParamsBodyObjectDetection struct {
// An array of integers that represent the image data constrained to 8-bit unsigned
// integer values
Image param.Field[[]float64] `json:"image"`
}
func (AIRunParamsBodyObjectDetection) MarshalJSON ¶
func (r AIRunParamsBodyObjectDetection) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyPrompt ¶
type AIRunParamsBodyPrompt struct {
// The input text prompt for the model to generate a response.
Prompt param.Field[string] `json:"prompt,required"`
// Decreases the likelihood of the model repeating the same lines verbatim.
FrequencyPenalty param.Field[float64] `json:"frequency_penalty"`
// Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.
Lora param.Field[string] `json:"lora"`
// The maximum number of tokens to generate in the response.
MaxTokens param.Field[int64] `json:"max_tokens"`
// Increases the likelihood of the model introducing new topics.
PresencePenalty param.Field[float64] `json:"presence_penalty"`
// If true, a chat template is not applied and you must adhere to the specific
// model's expected formatting.
Raw param.Field[bool] `json:"raw"`
// Penalty for repeated tokens; higher values discourage repetition.
RepetitionPenalty param.Field[float64] `json:"repetition_penalty"`
ResponseFormat param.Field[AIRunParamsBodyPromptResponseFormat] `json:"response_format"`
// Random seed for reproducibility of the generation.
Seed param.Field[int64] `json:"seed"`
// If true, the response will be streamed back incrementally using SSE, Server Sent
// Events.
Stream param.Field[bool] `json:"stream"`
// Controls the randomness of the output; higher values produce more random
// results.
Temperature param.Field[float64] `json:"temperature"`
// Limits the AI to choose from the top 'k' most probable words. Lower values make
// responses more focused; higher values introduce more variety and potential
// surprises.
TopK param.Field[int64] `json:"top_k"`
// Adjusts the creativity of the AI's responses by controlling how many possible
// words it considers. Lower values make outputs more predictable; higher values
// allow for more varied and creative responses.
TopP param.Field[float64] `json:"top_p"`
}
func (AIRunParamsBodyPrompt) MarshalJSON ¶
func (r AIRunParamsBodyPrompt) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyPromptResponseFormat ¶
type AIRunParamsBodyPromptResponseFormat struct {
JsonSchema param.Field[interface{}] `json:"json_schema"`
Type param.Field[AIRunParamsBodyPromptResponseFormatType] `json:"type"`
}
func (AIRunParamsBodyPromptResponseFormat) MarshalJSON ¶
func (r AIRunParamsBodyPromptResponseFormat) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyPromptResponseFormatType ¶
type AIRunParamsBodyPromptResponseFormatType string
const ( AIRunParamsBodyPromptResponseFormatTypeJsonObject AIRunParamsBodyPromptResponseFormatType = "json_object" AIRunParamsBodyPromptResponseFormatTypeJsonSchema AIRunParamsBodyPromptResponseFormatType = "json_schema" )
func (AIRunParamsBodyPromptResponseFormatType) IsKnown ¶
func (r AIRunParamsBodyPromptResponseFormatType) IsKnown() bool
type AIRunParamsBodySummarization ¶
type AIRunParamsBodySummarization struct {
// The text that you want the model to summarize
InputText param.Field[string] `json:"input_text,required"`
// The maximum length of the generated summary in tokens
MaxLength param.Field[int64] `json:"max_length"`
}
func (AIRunParamsBodySummarization) MarshalJSON ¶
func (r AIRunParamsBodySummarization) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTextClassification ¶
type AIRunParamsBodyTextClassification struct {
// The text that you want to classify
Text param.Field[string] `json:"text,required"`
}
func (AIRunParamsBodyTextClassification) MarshalJSON ¶
func (r AIRunParamsBodyTextClassification) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTextEmbeddings ¶
type AIRunParamsBodyTextEmbeddings struct {
// The text to embed
Text param.Field[AIRunParamsBodyTextEmbeddingsTextUnion] `json:"text,required"`
}
func (AIRunParamsBodyTextEmbeddings) MarshalJSON ¶
func (r AIRunParamsBodyTextEmbeddings) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTextEmbeddingsTextArray ¶
type AIRunParamsBodyTextEmbeddingsTextArray []string
func (AIRunParamsBodyTextEmbeddingsTextArray) ImplementsAIRunParamsBodyTextEmbeddingsTextUnion ¶
func (r AIRunParamsBodyTextEmbeddingsTextArray) ImplementsAIRunParamsBodyTextEmbeddingsTextUnion()
type AIRunParamsBodyTextEmbeddingsTextUnion ¶
type AIRunParamsBodyTextEmbeddingsTextUnion interface {
ImplementsAIRunParamsBodyTextEmbeddingsTextUnion()
}
The text to embed
Satisfied by shared.UnionString, ai.AIRunParamsBodyTextEmbeddingsTextArray.
type AIRunParamsBodyTextGeneration ¶
type AIRunParamsBodyTextGeneration struct {
// An array of message objects representing the conversation history.
Messages param.Field[[]AIRunParamsBodyTextGenerationMessage] `json:"messages,required"`
// Decreases the likelihood of the model repeating the same lines verbatim.
FrequencyPenalty param.Field[float64] `json:"frequency_penalty"`
Functions param.Field[[]AIRunParamsBodyTextGenerationFunction] `json:"functions"`
// The maximum number of tokens to generate in the response.
MaxTokens param.Field[int64] `json:"max_tokens"`
// Increases the likelihood of the model introducing new topics.
PresencePenalty param.Field[float64] `json:"presence_penalty"`
// If true, a chat template is not applied and you must adhere to the specific
// model's expected formatting.
Raw param.Field[bool] `json:"raw"`
// Penalty for repeated tokens; higher values discourage repetition.
RepetitionPenalty param.Field[float64] `json:"repetition_penalty"`
ResponseFormat param.Field[AIRunParamsBodyTextGenerationResponseFormat] `json:"response_format"`
// Random seed for reproducibility of the generation.
Seed param.Field[int64] `json:"seed"`
// If true, the response will be streamed back incrementally using SSE, Server Sent
// Events.
Stream param.Field[bool] `json:"stream"`
// Controls the randomness of the output; higher values produce more random
// results.
Temperature param.Field[float64] `json:"temperature"`
// A list of tools available for the assistant to use.
Tools param.Field[[]AIRunParamsBodyTextGenerationToolUnion] `json:"tools"`
// Limits the AI to choose from the top 'k' most probable words. Lower values make
// responses more focused; higher values introduce more variety and potential
// surprises.
TopK param.Field[int64] `json:"top_k"`
// Adjusts the creativity of the AI's responses by controlling how many possible
// words it considers. Lower values make outputs more predictable; higher values
// allow for more varied and creative responses.
TopP param.Field[float64] `json:"top_p"`
}
func (AIRunParamsBodyTextGeneration) MarshalJSON ¶
func (r AIRunParamsBodyTextGeneration) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTextGenerationFunction ¶
type AIRunParamsBodyTextGenerationFunction struct {
Code param.Field[string] `json:"code,required"`
Name param.Field[string] `json:"name,required"`
}
func (AIRunParamsBodyTextGenerationFunction) MarshalJSON ¶
func (r AIRunParamsBodyTextGenerationFunction) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTextGenerationMessage ¶
type AIRunParamsBodyTextGenerationMessage struct {
// The content of the message as a string.
Content param.Field[string] `json:"content,required"`
// The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
Role param.Field[string] `json:"role,required"`
}
func (AIRunParamsBodyTextGenerationMessage) MarshalJSON ¶
func (r AIRunParamsBodyTextGenerationMessage) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTextGenerationResponseFormat ¶
type AIRunParamsBodyTextGenerationResponseFormat struct {
JsonSchema param.Field[interface{}] `json:"json_schema"`
Type param.Field[AIRunParamsBodyTextGenerationResponseFormatType] `json:"type"`
}
func (AIRunParamsBodyTextGenerationResponseFormat) MarshalJSON ¶
func (r AIRunParamsBodyTextGenerationResponseFormat) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTextGenerationResponseFormatType ¶
type AIRunParamsBodyTextGenerationResponseFormatType string
const ( AIRunParamsBodyTextGenerationResponseFormatTypeJsonObject AIRunParamsBodyTextGenerationResponseFormatType = "json_object" AIRunParamsBodyTextGenerationResponseFormatTypeJsonSchema AIRunParamsBodyTextGenerationResponseFormatType = "json_schema" )
func (AIRunParamsBodyTextGenerationResponseFormatType) IsKnown ¶
func (r AIRunParamsBodyTextGenerationResponseFormatType) IsKnown() bool
type AIRunParamsBodyTextGenerationTool ¶
type AIRunParamsBodyTextGenerationTool struct {
// A brief description of what the tool does.
Description param.Field[string] `json:"description"`
Function param.Field[interface{}] `json:"function"`
// The name of the tool. More descriptive the better.
Name param.Field[string] `json:"name"`
Parameters param.Field[interface{}] `json:"parameters"`
// Specifies the type of tool (e.g., 'function').
Type param.Field[string] `json:"type"`
}
func (AIRunParamsBodyTextGenerationTool) MarshalJSON ¶
func (r AIRunParamsBodyTextGenerationTool) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTextGenerationToolUnion ¶
type AIRunParamsBodyTextGenerationToolUnion interface {
// contains filtered or unexported methods
}
Satisfied by ai.AIRunParamsBodyTextGenerationToolsObject, ai.AIRunParamsBodyTextGenerationToolsFunction, AIRunParamsBodyTextGenerationTool.
type AIRunParamsBodyTextGenerationToolsFunction ¶
type AIRunParamsBodyTextGenerationToolsFunction struct {
// Details of the function tool.
Function param.Field[AIRunParamsBodyTextGenerationToolsFunctionFunction] `json:"function,required"`
// Specifies the type of tool (e.g., 'function').
Type param.Field[string] `json:"type,required"`
}
func (AIRunParamsBodyTextGenerationToolsFunction) MarshalJSON ¶
func (r AIRunParamsBodyTextGenerationToolsFunction) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTextGenerationToolsFunctionFunction ¶
type AIRunParamsBodyTextGenerationToolsFunctionFunction struct {
// A brief description of what the function does.
Description param.Field[string] `json:"description,required"`
// The name of the function.
Name param.Field[string] `json:"name,required"`
// Schema defining the parameters accepted by the function.
Parameters param.Field[AIRunParamsBodyTextGenerationToolsFunctionFunctionParameters] `json:"parameters,required"`
}
Details of the function tool.
func (AIRunParamsBodyTextGenerationToolsFunctionFunction) MarshalJSON ¶
func (r AIRunParamsBodyTextGenerationToolsFunctionFunction) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTextGenerationToolsFunctionFunctionParameters ¶
type AIRunParamsBodyTextGenerationToolsFunctionFunctionParameters struct {
// Definitions of each parameter.
Properties param.Field[map[string]AIRunParamsBodyTextGenerationToolsFunctionFunctionParametersProperties] `json:"properties,required"`
// The type of the parameters object (usually 'object').
Type param.Field[string] `json:"type,required"`
// List of required parameter names.
Required param.Field[[]string] `json:"required"`
}
Schema defining the parameters accepted by the function.
func (AIRunParamsBodyTextGenerationToolsFunctionFunctionParameters) MarshalJSON ¶
func (r AIRunParamsBodyTextGenerationToolsFunctionFunctionParameters) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTextGenerationToolsFunctionFunctionParametersProperties ¶
type AIRunParamsBodyTextGenerationToolsFunctionFunctionParametersProperties struct {
// A description of the expected parameter.
Description param.Field[string] `json:"description,required"`
// The data type of the parameter.
Type param.Field[string] `json:"type,required"`
}
func (AIRunParamsBodyTextGenerationToolsFunctionFunctionParametersProperties) MarshalJSON ¶
func (r AIRunParamsBodyTextGenerationToolsFunctionFunctionParametersProperties) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTextGenerationToolsObject ¶
type AIRunParamsBodyTextGenerationToolsObject struct {
// A brief description of what the tool does.
Description param.Field[string] `json:"description,required"`
// The name of the tool. More descriptive the better.
Name param.Field[string] `json:"name,required"`
// Schema defining the parameters accepted by the tool.
Parameters param.Field[AIRunParamsBodyTextGenerationToolsObjectParameters] `json:"parameters,required"`
}
func (AIRunParamsBodyTextGenerationToolsObject) MarshalJSON ¶
func (r AIRunParamsBodyTextGenerationToolsObject) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTextGenerationToolsObjectParameters ¶
type AIRunParamsBodyTextGenerationToolsObjectParameters struct {
// Definitions of each parameter.
Properties param.Field[map[string]AIRunParamsBodyTextGenerationToolsObjectParametersProperties] `json:"properties,required"`
// The type of the parameters object (usually 'object').
Type param.Field[string] `json:"type,required"`
// List of required parameter names.
Required param.Field[[]string] `json:"required"`
}
Schema defining the parameters accepted by the tool.
func (AIRunParamsBodyTextGenerationToolsObjectParameters) MarshalJSON ¶
func (r AIRunParamsBodyTextGenerationToolsObjectParameters) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTextGenerationToolsObjectParametersProperties ¶
type AIRunParamsBodyTextGenerationToolsObjectParametersProperties struct {
// A description of the expected parameter.
Description param.Field[string] `json:"description,required"`
// The data type of the parameter.
Type param.Field[string] `json:"type,required"`
}
func (AIRunParamsBodyTextGenerationToolsObjectParametersProperties) MarshalJSON ¶
func (r AIRunParamsBodyTextGenerationToolsObjectParametersProperties) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTextToImage ¶
type AIRunParamsBodyTextToImage struct {
// A text description of the image you want to generate
Prompt param.Field[string] `json:"prompt,required"`
// Controls how closely the generated image should adhere to the prompt; higher
// values make the image more aligned with the prompt
Guidance param.Field[float64] `json:"guidance"`
// The height of the generated image in pixels
Height param.Field[int64] `json:"height"`
// For use with img2img tasks. An array of integers that represent the image data
// constrained to 8-bit unsigned integer values
Image param.Field[[]float64] `json:"image"`
// For use with img2img tasks. A base64-encoded string of the input image
ImageB64 param.Field[string] `json:"image_b64"`
// An array representing An array of integers that represent mask image data for
// inpainting constrained to 8-bit unsigned integer values
Mask param.Field[[]float64] `json:"mask"`
// Text describing elements to avoid in the generated image
NegativePrompt param.Field[string] `json:"negative_prompt"`
// The number of diffusion steps; higher values can improve quality but take longer
NumSteps param.Field[int64] `json:"num_steps"`
// Random seed for reproducibility of the image generation
Seed param.Field[int64] `json:"seed"`
// A value between 0 and 1 indicating how strongly to apply the transformation
// during img2img tasks; lower values make the output closer to the input image
Strength param.Field[float64] `json:"strength"`
// The width of the generated image in pixels
Width param.Field[int64] `json:"width"`
}
func (AIRunParamsBodyTextToImage) MarshalJSON ¶
func (r AIRunParamsBodyTextToImage) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTextToSpeech ¶
type AIRunParamsBodyTextToSpeech struct {
// A text description of the audio you want to generate
Prompt param.Field[string] `json:"prompt,required"`
// The speech language (e.g., 'en' for English, 'fr' for French). Defaults to 'en'
// if not specified
Lang param.Field[string] `json:"lang"`
}
func (AIRunParamsBodyTextToSpeech) MarshalJSON ¶
func (r AIRunParamsBodyTextToSpeech) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTranslation ¶
type AIRunParamsBodyTranslation struct {
// The language code to translate the text into (e.g., 'es' for Spanish)
TargetLang param.Field[string] `json:"target_lang,required"`
// The text to be translated
Text param.Field[string] `json:"text,required"`
// The language code of the source text (e.g., 'en' for English). Defaults to 'en'
// if not specified
SourceLang param.Field[string] `json:"source_lang"`
}
func (AIRunParamsBodyTranslation) MarshalJSON ¶
func (r AIRunParamsBodyTranslation) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyUnion ¶
type AIRunParamsBodyUnion interface {
// contains filtered or unexported methods
}
Satisfied by ai.AIRunParamsBodyTextClassification, ai.AIRunParamsBodyTextToImage, ai.AIRunParamsBodyTextToSpeech, ai.AIRunParamsBodyTextEmbeddings, ai.AIRunParamsBodyAutomaticSpeechRecognition, ai.AIRunParamsBodyImageClassification, ai.AIRunParamsBodyObjectDetection, ai.AIRunParamsBodyPrompt, ai.AIRunParamsBodyTextGeneration, ai.AIRunParamsBodyTranslation, ai.AIRunParamsBodySummarization, ai.AIRunParamsBodyImageToText, ai.AIRunParamsBodyObject, ai.AIRunParamsBodyImageTextToText, ai.AIRunParamsBodyMultimodalEmbeddings, AIRunParamsBody.
type AIRunResponseAudio ¶
type AIRunResponseAudio struct {
// The generated audio in MP3 format, base64-encoded
Audio string `json:"audio"`
JSON aiRunResponseAudioJSON `json:"-"`
}
func (AIRunResponseAudio) ImplementsAIRunResponseUnion ¶
func (r AIRunResponseAudio) ImplementsAIRunResponseUnion()
func (*AIRunResponseAudio) UnmarshalJSON ¶
func (r *AIRunResponseAudio) UnmarshalJSON(data []byte) (err error)
type AIRunResponseAutomaticSpeechRecognition ¶
type AIRunResponseAutomaticSpeechRecognition struct {
// The transcription
Text string `json:"text,required"`
Vtt string `json:"vtt"`
WordCount float64 `json:"word_count"`
Words []AIRunResponseAutomaticSpeechRecognitionWord `json:"words"`
JSON aiRunResponseAutomaticSpeechRecognitionJSON `json:"-"`
}
func (AIRunResponseAutomaticSpeechRecognition) ImplementsAIRunResponseUnion ¶
func (r AIRunResponseAutomaticSpeechRecognition) ImplementsAIRunResponseUnion()
func (*AIRunResponseAutomaticSpeechRecognition) UnmarshalJSON ¶
func (r *AIRunResponseAutomaticSpeechRecognition) UnmarshalJSON(data []byte) (err error)
type AIRunResponseAutomaticSpeechRecognitionWord ¶
type AIRunResponseAutomaticSpeechRecognitionWord struct {
// The ending second when the word completes
End float64 `json:"end"`
// The second this word begins in the recording
Start float64 `json:"start"`
Word string `json:"word"`
JSON aiRunResponseAutomaticSpeechRecognitionWordJSON `json:"-"`
}
func (*AIRunResponseAutomaticSpeechRecognitionWord) UnmarshalJSON ¶
func (r *AIRunResponseAutomaticSpeechRecognitionWord) UnmarshalJSON(data []byte) (err error)
type AIRunResponseEnvelope ¶
type AIRunResponseEnvelope struct {
// An array of classification results for the input text
Result AIRunResponseUnion `json:"result" format:"binary"`
JSON aiRunResponseEnvelopeJSON `json:"-"`
}
func (*AIRunResponseEnvelope) UnmarshalJSON ¶
func (r *AIRunResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AIRunResponseImageClassification ¶
type AIRunResponseImageClassification []AIRunResponseImageClassificationItem
func (AIRunResponseImageClassification) ImplementsAIRunResponseUnion ¶
func (r AIRunResponseImageClassification) ImplementsAIRunResponseUnion()
type AIRunResponseImageClassificationItem ¶
type AIRunResponseImageClassificationItem struct {
// The predicted category or class for the input image based on analysis
Label string `json:"label"`
// A confidence value, between 0 and 1, indicating how certain the model is about
// the predicted label
Score float64 `json:"score"`
JSON aiRunResponseImageClassificationItemJSON `json:"-"`
}
func (*AIRunResponseImageClassificationItem) UnmarshalJSON ¶
func (r *AIRunResponseImageClassificationItem) UnmarshalJSON(data []byte) (err error)
type AIRunResponseImageTextToText ¶
type AIRunResponseImageTextToText struct {
Description string `json:"description"`
JSON aiRunResponseImageTextToTextJSON `json:"-"`
}
func (AIRunResponseImageTextToText) ImplementsAIRunResponseUnion ¶
func (r AIRunResponseImageTextToText) ImplementsAIRunResponseUnion()
func (*AIRunResponseImageTextToText) UnmarshalJSON ¶
func (r *AIRunResponseImageTextToText) UnmarshalJSON(data []byte) (err error)
type AIRunResponseImageToText ¶
type AIRunResponseImageToText struct {
Description string `json:"description"`
JSON aiRunResponseImageToTextJSON `json:"-"`
}
func (AIRunResponseImageToText) ImplementsAIRunResponseUnion ¶
func (r AIRunResponseImageToText) ImplementsAIRunResponseUnion()
func (*AIRunResponseImageToText) UnmarshalJSON ¶
func (r *AIRunResponseImageToText) UnmarshalJSON(data []byte) (err error)
type AIRunResponseMultimodalEmbeddings ¶
type AIRunResponseMultimodalEmbeddings struct {
Data [][]float64 `json:"data"`
Shape []float64 `json:"shape"`
JSON aiRunResponseMultimodalEmbeddingsJSON `json:"-"`
}
func (AIRunResponseMultimodalEmbeddings) ImplementsAIRunResponseUnion ¶
func (r AIRunResponseMultimodalEmbeddings) ImplementsAIRunResponseUnion()
func (*AIRunResponseMultimodalEmbeddings) UnmarshalJSON ¶
func (r *AIRunResponseMultimodalEmbeddings) UnmarshalJSON(data []byte) (err error)
type AIRunResponseObject ¶
type AIRunResponseObject struct {
// The generated text response from the model
Response string `json:"response,required"`
// An array of tool calls requests made during the response generation
ToolCalls []AIRunResponseObjectToolCall `json:"tool_calls"`
// Usage statistics for the inference request
Usage AIRunResponseObjectUsage `json:"usage"`
JSON aiRunResponseObjectJSON `json:"-"`
}
func (AIRunResponseObject) ImplementsAIRunResponseUnion ¶
func (r AIRunResponseObject) ImplementsAIRunResponseUnion()
func (*AIRunResponseObject) UnmarshalJSON ¶
func (r *AIRunResponseObject) UnmarshalJSON(data []byte) (err error)
type AIRunResponseObjectDetection ¶
type AIRunResponseObjectDetection []AIRunResponseObjectDetectionItem
func (AIRunResponseObjectDetection) ImplementsAIRunResponseUnion ¶
func (r AIRunResponseObjectDetection) ImplementsAIRunResponseUnion()
type AIRunResponseObjectDetectionBox ¶
type AIRunResponseObjectDetectionBox struct {
// The x-coordinate of the bottom-right corner of the bounding box
Xmax float64 `json:"xmax"`
// The x-coordinate of the top-left corner of the bounding box
Xmin float64 `json:"xmin"`
// The y-coordinate of the bottom-right corner of the bounding box
Ymax float64 `json:"ymax"`
// The y-coordinate of the top-left corner of the bounding box
Ymin float64 `json:"ymin"`
JSON aiRunResponseObjectDetectionBoxJSON `json:"-"`
}
Coordinates defining the bounding box around the detected object
func (*AIRunResponseObjectDetectionBox) UnmarshalJSON ¶
func (r *AIRunResponseObjectDetectionBox) UnmarshalJSON(data []byte) (err error)
type AIRunResponseObjectDetectionItem ¶
type AIRunResponseObjectDetectionItem struct {
// Coordinates defining the bounding box around the detected object
Box AIRunResponseObjectDetectionBox `json:"box"`
// The class label or name of the detected object
Label string `json:"label"`
// Confidence score indicating the likelihood that the detection is correct
Score float64 `json:"score"`
JSON aiRunResponseObjectDetectionItemJSON `json:"-"`
}
func (*AIRunResponseObjectDetectionItem) UnmarshalJSON ¶
func (r *AIRunResponseObjectDetectionItem) UnmarshalJSON(data []byte) (err error)
type AIRunResponseObjectToolCall ¶
type AIRunResponseObjectToolCall struct {
// The arguments passed to be passed to the tool call request
Arguments interface{} `json:"arguments"`
// The name of the tool to be called
Name string `json:"name"`
JSON aiRunResponseObjectToolCallJSON `json:"-"`
}
func (*AIRunResponseObjectToolCall) UnmarshalJSON ¶
func (r *AIRunResponseObjectToolCall) UnmarshalJSON(data []byte) (err error)
type AIRunResponseObjectUsage ¶
type AIRunResponseObjectUsage struct {
// Total number of tokens in output
CompletionTokens float64 `json:"completion_tokens"`
// Total number of tokens in input
PromptTokens float64 `json:"prompt_tokens"`
// Total number of input and output tokens
TotalTokens float64 `json:"total_tokens"`
JSON aiRunResponseObjectUsageJSON `json:"-"`
}
Usage statistics for the inference request
func (*AIRunResponseObjectUsage) UnmarshalJSON ¶
func (r *AIRunResponseObjectUsage) UnmarshalJSON(data []byte) (err error)
type AIRunResponseSummarization ¶
type AIRunResponseSummarization struct {
// The summarized version of the input text
Summary string `json:"summary"`
JSON aiRunResponseSummarizationJSON `json:"-"`
}
func (AIRunResponseSummarization) ImplementsAIRunResponseUnion ¶
func (r AIRunResponseSummarization) ImplementsAIRunResponseUnion()
func (*AIRunResponseSummarization) UnmarshalJSON ¶
func (r *AIRunResponseSummarization) UnmarshalJSON(data []byte) (err error)
type AIRunResponseTextClassification ¶
type AIRunResponseTextClassification []AIRunResponseTextClassificationItem
func (AIRunResponseTextClassification) ImplementsAIRunResponseUnion ¶
func (r AIRunResponseTextClassification) ImplementsAIRunResponseUnion()
type AIRunResponseTextClassificationItem ¶
type AIRunResponseTextClassificationItem struct {
// The classification label assigned to the text (e.g., 'POSITIVE' or 'NEGATIVE')
Label string `json:"label"`
// Confidence score indicating the likelihood that the text belongs to the
// specified label
Score float64 `json:"score"`
JSON aiRunResponseTextClassificationItemJSON `json:"-"`
}
func (*AIRunResponseTextClassificationItem) UnmarshalJSON ¶
func (r *AIRunResponseTextClassificationItem) UnmarshalJSON(data []byte) (err error)
type AIRunResponseTextEmbeddings ¶
type AIRunResponseTextEmbeddings struct {
// Embeddings of the requested text values
Data [][]float64 `json:"data"`
Shape []float64 `json:"shape"`
JSON aiRunResponseTextEmbeddingsJSON `json:"-"`
}
func (AIRunResponseTextEmbeddings) ImplementsAIRunResponseUnion ¶
func (r AIRunResponseTextEmbeddings) ImplementsAIRunResponseUnion()
func (*AIRunResponseTextEmbeddings) UnmarshalJSON ¶
func (r *AIRunResponseTextEmbeddings) UnmarshalJSON(data []byte) (err error)
type AIRunResponseTranslation ¶
type AIRunResponseTranslation struct {
// The translated text in the target language
TranslatedText string `json:"translated_text"`
JSON aiRunResponseTranslationJSON `json:"-"`
}
func (AIRunResponseTranslation) ImplementsAIRunResponseUnion ¶
func (r AIRunResponseTranslation) ImplementsAIRunResponseUnion()
func (*AIRunResponseTranslation) UnmarshalJSON ¶
func (r *AIRunResponseTranslation) UnmarshalJSON(data []byte) (err error)
type AIRunResponseUnion ¶
type AIRunResponseUnion interface {
ImplementsAIRunResponseUnion()
}
An array of classification results for the input text
Union satisfied by AIRunResponseTextClassification, shared.UnionString, AIRunResponseAudio, shared.UnionString, AIRunResponseTextEmbeddings, AIRunResponseAutomaticSpeechRecognition, AIRunResponseImageClassification, AIRunResponseObjectDetection, AIRunResponseObject, shared.UnionString, AIRunResponseTranslation, AIRunResponseSummarization, AIRunResponseImageToText, AIRunResponseImageTextToText or AIRunResponseMultimodalEmbeddings.
type AIService ¶
type AIService struct {
Options []option.RequestOption
Finetunes *FinetuneService
Authors *AuthorService
Tasks *TaskService
Models *ModelService
ToMarkdown *ToMarkdownService
}
AIService contains methods and other services that help with interacting with the cloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAIService method instead.
func NewAIService ¶
func NewAIService(opts ...option.RequestOption) (r *AIService)
NewAIService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AIService) Run ¶
func (r *AIService) Run(ctx context.Context, modelName string, params AIRunParams, opts ...option.RequestOption) (res *AIRunResponseUnion, err error)
This endpoint provides users with the capability to run specific AI models on-demand.
By submitting the required input data, users can receive real-time predictions or results generated by the chosen AI model. The endpoint supports various AI model types, ensuring flexibility and adaptability for diverse use cases.
Model specific inputs available in [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/).
type AuditLogAction ¶
type AuditLogAction = shared.AuditLogAction
This is an alias to an internal type.
type AuditLogActor ¶
type AuditLogActor = shared.AuditLogActor
This is an alias to an internal type.
type AuditLogActorType ¶
type AuditLogActorType = shared.AuditLogActorType
The type of actor, whether a User, Cloudflare Admin, or an Automated System.
This is an alias to an internal type.
type AuditLogOwner ¶
type AuditLogOwner = shared.AuditLogOwner
This is an alias to an internal type.
type AuditLogResource ¶
type AuditLogResource = shared.AuditLogResource
This is an alias to an internal type.
type AuthorListParams ¶
type AuthorListResponse ¶
type AuthorListResponse = interface{}
type AuthorService ¶
type AuthorService struct {
Options []option.RequestOption
}
AuthorService contains methods and other services that help with interacting with the cloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAuthorService method instead.
func NewAuthorService ¶
func NewAuthorService(opts ...option.RequestOption) (r *AuthorService)
NewAuthorService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AuthorService) List ¶
func (r *AuthorService) List(ctx context.Context, query AuthorListParams, opts ...option.RequestOption) (res *pagination.SinglePage[AuthorListResponse], err error)
Author Search
func (*AuthorService) ListAutoPaging ¶
func (r *AuthorService) ListAutoPaging(ctx context.Context, query AuthorListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[AuthorListResponse]
Author Search
type CertificateCA ¶
type CertificateCA = shared.CertificateCA
The Certificate Authority that will issue the certificate
This is an alias to an internal type.
type CertificateRequestType ¶
type CertificateRequestType = shared.CertificateRequestType
Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).
This is an alias to an internal type.
type CloudflareTunnel ¶
type CloudflareTunnel = shared.CloudflareTunnel
A Cloudflare Tunnel that connects your origin to Cloudflare's edge.
This is an alias to an internal type.
type CloudflareTunnelConfigSrc ¶
type CloudflareTunnelConfigSrc = shared.CloudflareTunnelConfigSrc
Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard.
This is an alias to an internal type.
type CloudflareTunnelConnection ¶
type CloudflareTunnelConnection = shared.CloudflareTunnelConnection
This is an alias to an internal type.
type CloudflareTunnelStatus ¶
type CloudflareTunnelStatus = shared.CloudflareTunnelStatus
The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
This is an alias to an internal type.
type CloudflareTunnelTunType ¶
type CloudflareTunnelTunType = shared.CloudflareTunnelTunType
The type of tunnel.
This is an alias to an internal type.
type ErrorDataSource ¶
type ErrorDataSource = shared.ErrorDataSource
This is an alias to an internal type.
type FinetuneAssetNewParams ¶
type FinetuneAssetNewParams struct {
AccountID param.Field[string] `path:"account_id,required"`
File param.Field[io.Reader] `json:"file" format:"binary"`
FileName param.Field[string] `json:"file_name"`
}
func (FinetuneAssetNewParams) MarshalMultipart ¶
func (r FinetuneAssetNewParams) MarshalMultipart() (data []byte, contentType string, err error)
type FinetuneAssetNewResponse ¶
type FinetuneAssetNewResponse struct {
Success bool `json:"success,required"`
JSON finetuneAssetNewResponseJSON `json:"-"`
}
func (*FinetuneAssetNewResponse) UnmarshalJSON ¶
func (r *FinetuneAssetNewResponse) UnmarshalJSON(data []byte) (err error)
type FinetuneAssetService ¶
type FinetuneAssetService struct {
Options []option.RequestOption
}
FinetuneAssetService contains methods and other services that help with interacting with the cloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFinetuneAssetService method instead.
func NewFinetuneAssetService ¶
func NewFinetuneAssetService(opts ...option.RequestOption) (r *FinetuneAssetService)
NewFinetuneAssetService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FinetuneAssetService) New ¶
func (r *FinetuneAssetService) New(ctx context.Context, finetuneID string, params FinetuneAssetNewParams, opts ...option.RequestOption) (res *FinetuneAssetNewResponse, err error)
Upload a Finetune Asset
type FinetuneListParams ¶
type FinetuneListResponse ¶
type FinetuneListResponse struct {
ID string `json:"id,required" format:"uuid"`
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Model string `json:"model,required"`
ModifiedAt time.Time `json:"modified_at,required" format:"date-time"`
Name string `json:"name,required"`
Description string `json:"description"`
JSON finetuneListResponseJSON `json:"-"`
}
func (*FinetuneListResponse) UnmarshalJSON ¶
func (r *FinetuneListResponse) UnmarshalJSON(data []byte) (err error)
type FinetuneListResponseEnvelope ¶
type FinetuneListResponseEnvelope struct {
Result FinetuneListResponse `json:"result,required"`
Success bool `json:"success,required"`
JSON finetuneListResponseEnvelopeJSON `json:"-"`
}
func (*FinetuneListResponseEnvelope) UnmarshalJSON ¶
func (r *FinetuneListResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type FinetuneNewParams ¶
type FinetuneNewParams struct {
AccountID param.Field[string] `path:"account_id,required"`
Model param.Field[string] `json:"model,required"`
Name param.Field[string] `json:"name,required"`
Description param.Field[string] `json:"description"`
Public param.Field[bool] `json:"public"`
}
func (FinetuneNewParams) MarshalJSON ¶
func (r FinetuneNewParams) MarshalJSON() (data []byte, err error)
type FinetuneNewResponse ¶
type FinetuneNewResponse struct {
ID string `json:"id,required" format:"uuid"`
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Model string `json:"model,required"`
ModifiedAt time.Time `json:"modified_at,required" format:"date-time"`
Name string `json:"name,required"`
Public bool `json:"public,required"`
Description string `json:"description"`
JSON finetuneNewResponseJSON `json:"-"`
}
func (*FinetuneNewResponse) UnmarshalJSON ¶
func (r *FinetuneNewResponse) UnmarshalJSON(data []byte) (err error)
type FinetuneNewResponseEnvelope ¶
type FinetuneNewResponseEnvelope struct {
Result FinetuneNewResponse `json:"result,required"`
Success bool `json:"success,required"`
JSON finetuneNewResponseEnvelopeJSON `json:"-"`
}
func (*FinetuneNewResponseEnvelope) UnmarshalJSON ¶
func (r *FinetuneNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type FinetunePublicListParams ¶
type FinetunePublicListParams struct {
AccountID param.Field[string] `path:"account_id,required"`
// Pagination Limit
Limit param.Field[float64] `query:"limit"`
// Pagination Offset
Offset param.Field[float64] `query:"offset"`
// Order By Column Name
OrderBy param.Field[string] `query:"orderBy"`
}
func (FinetunePublicListParams) URLQuery ¶
func (r FinetunePublicListParams) URLQuery() (v url.Values)
URLQuery serializes FinetunePublicListParams's query parameters as `url.Values`.
type FinetunePublicListResponse ¶
type FinetunePublicListResponse struct {
ID string `json:"id,required" format:"uuid"`
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Model string `json:"model,required"`
ModifiedAt time.Time `json:"modified_at,required" format:"date-time"`
Name string `json:"name,required"`
Public bool `json:"public,required"`
Description string `json:"description"`
JSON finetunePublicListResponseJSON `json:"-"`
}
func (*FinetunePublicListResponse) UnmarshalJSON ¶
func (r *FinetunePublicListResponse) UnmarshalJSON(data []byte) (err error)
type FinetunePublicService ¶
type FinetunePublicService struct {
Options []option.RequestOption
}
FinetunePublicService contains methods and other services that help with interacting with the cloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFinetunePublicService method instead.
func NewFinetunePublicService ¶
func NewFinetunePublicService(opts ...option.RequestOption) (r *FinetunePublicService)
NewFinetunePublicService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FinetunePublicService) List ¶
func (r *FinetunePublicService) List(ctx context.Context, params FinetunePublicListParams, opts ...option.RequestOption) (res *pagination.SinglePage[FinetunePublicListResponse], err error)
List Public Finetunes
func (*FinetunePublicService) ListAutoPaging ¶
func (r *FinetunePublicService) ListAutoPaging(ctx context.Context, params FinetunePublicListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[FinetunePublicListResponse]
List Public Finetunes
type FinetuneService ¶
type FinetuneService struct {
Options []option.RequestOption
Assets *FinetuneAssetService
Public *FinetunePublicService
}
FinetuneService contains methods and other services that help with interacting with the cloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFinetuneService method instead.
func NewFinetuneService ¶
func NewFinetuneService(opts ...option.RequestOption) (r *FinetuneService)
NewFinetuneService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FinetuneService) List ¶
func (r *FinetuneService) List(ctx context.Context, query FinetuneListParams, opts ...option.RequestOption) (res *FinetuneListResponse, err error)
List Finetunes
func (*FinetuneService) New ¶
func (r *FinetuneService) New(ctx context.Context, params FinetuneNewParams, opts ...option.RequestOption) (res *FinetuneNewResponse, err error)
Create a new Finetune
type MemberPoliciesAccess ¶
type MemberPoliciesAccess = shared.MemberPoliciesAccess
Allow or deny operations against the resources.
This is an alias to an internal type.
type MemberPoliciesPermissionGroup ¶
type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type MemberPoliciesPermissionGroupsMeta ¶
type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type MemberPoliciesResourceGroup ¶
type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup
A group of scoped resources.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsMeta ¶
type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta
Attributes associated to the resource group.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsScope ¶
type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope
A scope is a combination of scope objects which provides additional context.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsScopeObject ¶
type MemberPoliciesResourceGroupsScopeObject = shared.MemberPoliciesResourceGroupsScopeObject
A scope object represents any resource that can have actions applied against invite.
This is an alias to an internal type.
type MemberStatus ¶
type MemberStatus = shared.MemberStatus
A member's status in the account.
This is an alias to an internal type.
type MemberUser ¶
type MemberUser = shared.MemberUser
Details of the user associated to the membership.
This is an alias to an internal type.
type ModelListParams ¶
type ModelListParams struct {
AccountID param.Field[string] `path:"account_id,required"`
// Filter by Author
Author param.Field[string] `query:"author"`
// Filter to hide experimental models
HideExperimental param.Field[bool] `query:"hide_experimental"`
Page param.Field[int64] `query:"page"`
PerPage param.Field[int64] `query:"per_page"`
// Search
Search param.Field[string] `query:"search"`
// Filter by Source Id
Source param.Field[float64] `query:"source"`
// Filter by Task Name
Task param.Field[string] `query:"task"`
}
func (ModelListParams) URLQuery ¶
func (r ModelListParams) URLQuery() (v url.Values)
URLQuery serializes ModelListParams's query parameters as `url.Values`.
type ModelListResponse ¶
type ModelListResponse = interface{}
type ModelSchemaGetParams ¶
type ModelSchemaGetParams struct {
AccountID param.Field[string] `path:"account_id,required"`
// Model Name
Model param.Field[string] `query:"model,required"`
}
func (ModelSchemaGetParams) URLQuery ¶
func (r ModelSchemaGetParams) URLQuery() (v url.Values)
URLQuery serializes ModelSchemaGetParams's query parameters as `url.Values`.
type ModelSchemaGetResponse ¶
type ModelSchemaGetResponse = interface{}
type ModelSchemaGetResponseEnvelope ¶
type ModelSchemaGetResponseEnvelope struct {
Result ModelSchemaGetResponse `json:"result,required"`
Success bool `json:"success,required"`
JSON modelSchemaGetResponseEnvelopeJSON `json:"-"`
}
func (*ModelSchemaGetResponseEnvelope) UnmarshalJSON ¶
func (r *ModelSchemaGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ModelSchemaService ¶
type ModelSchemaService struct {
Options []option.RequestOption
}
ModelSchemaService contains methods and other services that help with interacting with the cloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewModelSchemaService method instead.
func NewModelSchemaService ¶
func NewModelSchemaService(opts ...option.RequestOption) (r *ModelSchemaService)
NewModelSchemaService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ModelSchemaService) Get ¶
func (r *ModelSchemaService) Get(ctx context.Context, params ModelSchemaGetParams, opts ...option.RequestOption) (res *ModelSchemaGetResponse, err error)
Get Model Schema
type ModelService ¶
type ModelService struct {
Options []option.RequestOption
Schema *ModelSchemaService
}
ModelService contains methods and other services that help with interacting with the cloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewModelService method instead.
func NewModelService ¶
func NewModelService(opts ...option.RequestOption) (r *ModelService)
NewModelService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ModelService) List ¶
func (r *ModelService) List(ctx context.Context, params ModelListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[ModelListResponse], err error)
Model Search
func (*ModelService) ListAutoPaging ¶
func (r *ModelService) ListAutoPaging(ctx context.Context, params ModelListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[ModelListResponse]
Model Search
type PermissionGrant ¶
type PermissionGrant = shared.PermissionGrant
This is an alias to an internal type.
type PermissionGrantParam ¶
type PermissionGrantParam = shared.PermissionGrantParam
This is an alias to an internal type.
type RatePlanID ¶
type RatePlanID = shared.RatePlanID
The ID of the rate plan.
This is an alias to an internal type.
type RatePlanParam ¶
type RatePlanParam = shared.RatePlanParam
The rate plan applied to the subscription.
This is an alias to an internal type.
type ResponseInfoSource ¶
type ResponseInfoSource = shared.ResponseInfoSource
This is an alias to an internal type.
type RolePermissions ¶
type RolePermissions = shared.RolePermissions
This is an alias to an internal type.
type RolePermissionsParam ¶
type RolePermissionsParam = shared.RolePermissionsParam
This is an alias to an internal type.
type SortDirection ¶
type SortDirection = shared.SortDirection
Direction to order DNS records in.
This is an alias to an internal type.
type SubscriptionFrequency ¶
type SubscriptionFrequency = shared.SubscriptionFrequency
How often the subscription is renewed automatically.
This is an alias to an internal type.
type SubscriptionParam ¶
type SubscriptionParam = shared.SubscriptionParam
This is an alias to an internal type.
type SubscriptionState ¶
type SubscriptionState = shared.SubscriptionState
The state that the subscription is in.
This is an alias to an internal type.
type TaskListParams ¶
type TaskListResponse ¶
type TaskListResponse = interface{}
type TaskService ¶
type TaskService struct {
Options []option.RequestOption
}
TaskService contains methods and other services that help with interacting with the cloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTaskService method instead.
func NewTaskService ¶
func NewTaskService(opts ...option.RequestOption) (r *TaskService)
NewTaskService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TaskService) List ¶
func (r *TaskService) List(ctx context.Context, query TaskListParams, opts ...option.RequestOption) (res *pagination.SinglePage[TaskListResponse], err error)
Task Search
func (*TaskService) ListAutoPaging ¶
func (r *TaskService) ListAutoPaging(ctx context.Context, query TaskListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[TaskListResponse]
Task Search
type ToMarkdownService ¶ added in v6.1.0
type ToMarkdownService struct {
Options []option.RequestOption
}
ToMarkdownService contains methods and other services that help with interacting with the cloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewToMarkdownService method instead.
func NewToMarkdownService ¶ added in v6.1.0
func NewToMarkdownService(opts ...option.RequestOption) (r *ToMarkdownService)
NewToMarkdownService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ToMarkdownService) Supported ¶ added in v6.3.0
func (r *ToMarkdownService) Supported(ctx context.Context, query ToMarkdownSupportedParams, opts ...option.RequestOption) (res *pagination.SinglePage[ToMarkdownSupportedResponse], err error)
Get all converted formats supported
func (*ToMarkdownService) SupportedAutoPaging ¶ added in v6.3.0
func (r *ToMarkdownService) SupportedAutoPaging(ctx context.Context, query ToMarkdownSupportedParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[ToMarkdownSupportedResponse]
Get all converted formats supported
func (*ToMarkdownService) Transform ¶ added in v6.1.0
func (r *ToMarkdownService) Transform(ctx context.Context, params ToMarkdownTransformParams, opts ...option.RequestOption) (res *pagination.SinglePage[ToMarkdownTransformResponse], err error)
Convert Files into Markdown
func (*ToMarkdownService) TransformAutoPaging ¶ added in v6.1.0
func (r *ToMarkdownService) TransformAutoPaging(ctx context.Context, params ToMarkdownTransformParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[ToMarkdownTransformResponse]
Convert Files into Markdown
type ToMarkdownSupportedParams ¶ added in v6.3.0
type ToMarkdownSupportedResponse ¶ added in v6.3.0
type ToMarkdownSupportedResponse struct {
Extension string `json:"extension,required"`
MimeType string `json:"mimeType,required"`
JSON toMarkdownSupportedResponseJSON `json:"-"`
}
func (*ToMarkdownSupportedResponse) UnmarshalJSON ¶ added in v6.3.0
func (r *ToMarkdownSupportedResponse) UnmarshalJSON(data []byte) (err error)
type ToMarkdownTransformParams ¶ added in v6.1.0
type ToMarkdownTransformParams struct {
AccountID param.Field[string] `path:"account_id,required"`
File ToMarkdownTransformParamsFile `json:"file,required"`
}
func (ToMarkdownTransformParams) MarshalMultipart ¶ added in v6.1.0
func (r ToMarkdownTransformParams) MarshalMultipart() (data []byte, contentType string, err error)
type ToMarkdownTransformParamsFile ¶ added in v6.7.0
type ToMarkdownTransformParamsFile struct {
Files param.Field[[]io.Reader] `json:"files,required" format:"binary"`
}
func (ToMarkdownTransformParamsFile) MarshalJSON ¶ added in v6.7.0
func (r ToMarkdownTransformParamsFile) MarshalJSON() (data []byte, err error)
type ToMarkdownTransformResponse ¶ added in v6.1.0
type ToMarkdownTransformResponse struct {
Data string `json:"data,required"`
Format string `json:"format,required"`
MimeType string `json:"mimeType,required"`
Name string `json:"name,required"`
Tokens string `json:"tokens,required"`
JSON toMarkdownTransformResponseJSON `json:"-"`
}
func (*ToMarkdownTransformResponse) UnmarshalJSON ¶ added in v6.1.0
func (r *ToMarkdownTransformResponse) UnmarshalJSON(data []byte) (err error)
type TokenCondition ¶
type TokenCondition = shared.TokenCondition
This is an alias to an internal type.
type TokenConditionCIDRList ¶
type TokenConditionCIDRList = shared.TokenConditionCIDRList
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionCIDRListParam ¶
type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionParam ¶
type TokenConditionParam = shared.TokenConditionParam
This is an alias to an internal type.
type TokenConditionRequestIP ¶
type TokenConditionRequestIP = shared.TokenConditionRequestIP
Client IP restrictions.
This is an alias to an internal type.
type TokenConditionRequestIPParam ¶
type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam
Client IP restrictions.
This is an alias to an internal type.
type TokenPolicyEffect ¶
type TokenPolicyEffect = shared.TokenPolicyEffect
Allow or deny operations against the resources.
This is an alias to an internal type.
type TokenPolicyParam ¶
type TokenPolicyParam = shared.TokenPolicyParam
This is an alias to an internal type.
type TokenPolicyPermissionGroup ¶
type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupParam ¶
type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMeta ¶
type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMetaParam ¶
type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectNested ¶
type TokenPolicyResourcesIAMResourcesTypeObjectNested = shared.TokenPolicyResourcesIAMResourcesTypeObjectNested
Map of nested resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam ¶
type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectNestedParam
Map of nested resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectString ¶
type TokenPolicyResourcesIAMResourcesTypeObjectString = shared.TokenPolicyResourcesIAMResourcesTypeObjectString
Map of simple string resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectStringParam ¶
type TokenPolicyResourcesIAMResourcesTypeObjectStringParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectStringParam
Map of simple string resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesUnion ¶
type TokenPolicyResourcesUnion = shared.TokenPolicyResourcesUnion
A list of resource names that the policy applies to.
This is an alias to an internal type.
type TokenPolicyResourcesUnionParam ¶
type TokenPolicyResourcesUnionParam = shared.TokenPolicyResourcesUnionParam
A list of resource names that the policy applies to.
This is an alias to an internal type.
type TokenStatus ¶
type TokenStatus = shared.TokenStatus
Status of the token.
This is an alias to an internal type.
type TokenValue ¶
type TokenValue = shared.TokenValue
The token value.
This is an alias to an internal type.