Help us shape the future of Go! Take the 2026 Go Developer Survey

read

package
v0.1.57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ReaderDatlyResourceNamespace = "datly_modelcall_read_reader"

DatlyResourceNamespace identifies this package's generated resource filesystem.

Variables

View Source
var ReaderDatly = new(ReaderComponent)

The public value supports explicit component wiring.

View Source
var ReaderDatlyResources embed.FS

Functions

func ReaderDatlyType

func ReaderDatlyType() reflect.Type

ReaderDatlyType returns the public component type.

Types

type ModelCallView

type ModelCallView struct {
	CleanupStatus                      string     `internal:"true" json:"-" sqlx:"cleanup_status"`
	MessageId                          string     `validate:"required" sqlx:"message_id,primaryKey,refTable=message,refColumn=id" json:"messageId"`
	TurnId                             *string    `sqlx:"turn_id,refTable=turn,refColumn=id" json:"turnId"`
	Provider                           string     `validate:"required" sqlx:"provider,required=true" json:"provider"`
	Model                              string     `validate:"required" sqlx:"model,required=true" json:"model"`
	ModelKind                          string     `validate:"required" sqlx:"model_kind,required=true" json:"modelKind"`
	Status                             string     `validate:"required" sqlx:"status,required=true" json:"status"`
	ErrorCode                          *string    `sqlx:"error_code" json:"errorCode"`
	ErrorMessage                       *string    `sqlx:"error_message" json:"errorMessage"`
	PromptTokens                       *int       `sqlx:"prompt_tokens" json:"promptTokens"`
	PromptCachedTokens                 *int       `sqlx:"prompt_cached_tokens" json:"promptCachedTokens"`
	CompletionTokens                   *int       `sqlx:"completion_tokens" json:"completionTokens"`
	TotalTokens                        *int       `sqlx:"total_tokens" json:"totalTokens"`
	PromptAudioTokens                  *int       `sqlx:"prompt_audio_tokens" json:"promptAudioTokens"`
	CompletionReasoningTokens          *int       `sqlx:"completion_reasoning_tokens" json:"completionReasoningTokens"`
	CompletionAudioTokens              *int       `sqlx:"completion_audio_tokens" json:"completionAudioTokens"`
	CompletionAcceptedPredictionTokens *int       `sqlx:"completion_accepted_prediction_tokens" json:"completionAcceptedPredictionTokens"`
	CompletionRejectedPredictionTokens *int       `sqlx:"completion_rejected_prediction_tokens" json:"completionRejectedPredictionTokens"`
	FinishReason                       *string    `sqlx:"finish_reason" json:"finishReason"`
	StartedAt                          *time.Time `sqlx:"started_at" json:"startedAt"`
	CompletedAt                        *time.Time `sqlx:"completed_at" json:"completedAt"`
	LatencyMs                          *int       `sqlx:"latency_ms" json:"latencyMs"`
	Cost                               *float64   `sqlx:"cost" json:"cost"`
	TraceId                            *string    `sqlx:"trace_id" json:"traceId"`
	SpanId                             *string    `sqlx:"span_id" json:"spanId"`
	RequestPayloadId                   *string    `sqlx:"request_payload_id,refTable=call_payload,refColumn=id" json:"requestPayloadId"`
	ResponsePayloadId                  *string    `sqlx:"response_payload_id,refTable=call_payload,refColumn=id" json:"responsePayloadId"`
	ProviderRequestPayloadId           *string    `sqlx:"provider_request_payload_id,refTable=call_payload,refColumn=id" json:"providerRequestPayloadId"`
	ProviderResponsePayloadId          *string    `sqlx:"provider_response_payload_id,refTable=call_payload,refColumn=id" json:"providerResponsePayloadId"`
	StreamPayloadId                    *string    `sqlx:"stream_payload_id,refTable=call_payload,refColumn=id" json:"streamPayloadId"`
	RunId                              *string    `sqlx:"run_id" json:"runId"`
	Iteration                          *int       `sqlx:"iteration" json:"iteration"`
}

ModelCallView is generated canonical view metadata for reader.

type ModelCallsInput

type ModelCallsInput struct {
	Internal          bool                `parameter:"Internal,kind=modelcallaccess,in=internal,dataType=bool,required=true"`
	ReadMode          string              `parameter:"ReadMode,kind=modelcallaccess,in=mode,dataType=string,required=true"`
	VisibilitySubject *string             `parameter:"VisibilitySubject,kind=visibility,in=subject,dataType=*string,required=true"`
	MessageId         string              `parameter:"MessageId,kind=query,in=messageId,dataType=string,required=false" predicate:"equal,data_rows,message_id"`
	MessageIds        []string            `parameter:"MessageIds,kind=query,in=messageIds,dataType=[]string,required=false" predicate:"in,data_rows,message_id"`
	ConversationId    string              `` /* 194-byte string literal not displayed */
	TurnId            string              `parameter:"TurnId,kind=query,in=turnId,dataType=string,required=false" predicate:"equal,data_rows,turn_id"`
	TurnIds           []string            `parameter:"TurnIds,kind=query,in=turnIds,dataType=[]string,required=false" predicate:"in,data_rows,turn_id"`
	RunId             string              `parameter:"RunId,kind=query,in=runId,dataType=string,required=false" predicate:"equal,data_rows,run_id"`
	Provider          string              `parameter:"Provider,kind=query,in=provider,dataType=string,required=false" predicate:"equal,data_rows,provider"`
	Model             string              `parameter:"Model,kind=query,in=model,dataType=string,required=false" predicate:"equal,data_rows,model"`
	Statuses          []string            `parameter:"Statuses,kind=query,in=statuses,dataType=[]string,required=false" predicate:"in,data_rows,status"`
	StartedAfter      time.Time           `` /* 135-byte string literal not displayed */
	StartedBefore     time.Time           `` /* 134-byte string literal not displayed */
	Fields            []string            `` /* 132-byte string literal not displayed */
	Limit             int                 `parameter:"Limit,kind=query,in=limit,dataType=int,required=false,cacheable=false" querySelector:"view=reader,property=limit"`
	Offset            int                 `` /* 127-byte string literal not displayed */
	Has               *ModelCallsInputHas `setMarker:"true" typeName:"ModelCallsInputHas" json:"-" sqlx:"-"`
}

ModelCallsInput is the generated input scaffold for reader.

func (*ModelCallsInput) Init

func (input *ModelCallsInput) Init(context.Context) error

func (*ModelCallsInput) SetConversationId

func (input *ModelCallsInput) SetConversationId(value string)

func (*ModelCallsInput) SetFields

func (input *ModelCallsInput) SetFields(value []string)

func (*ModelCallsInput) SetInternal

func (input *ModelCallsInput) SetInternal(value bool)

func (*ModelCallsInput) SetLimit

func (input *ModelCallsInput) SetLimit(value int)

func (*ModelCallsInput) SetMessageId

func (input *ModelCallsInput) SetMessageId(value string)

func (*ModelCallsInput) SetMessageIds

func (input *ModelCallsInput) SetMessageIds(value []string)

func (*ModelCallsInput) SetModel

func (input *ModelCallsInput) SetModel(value string)

func (*ModelCallsInput) SetOffset

func (input *ModelCallsInput) SetOffset(value int)

func (*ModelCallsInput) SetProvider

func (input *ModelCallsInput) SetProvider(value string)

func (*ModelCallsInput) SetReadMode

func (input *ModelCallsInput) SetReadMode(value string)

func (*ModelCallsInput) SetRunId

func (input *ModelCallsInput) SetRunId(value string)

func (*ModelCallsInput) SetStartedAfter

func (input *ModelCallsInput) SetStartedAfter(value time.Time)

func (*ModelCallsInput) SetStartedBefore

func (input *ModelCallsInput) SetStartedBefore(value time.Time)

func (*ModelCallsInput) SetStatuses

func (input *ModelCallsInput) SetStatuses(value []string)

func (*ModelCallsInput) SetTurnId

func (input *ModelCallsInput) SetTurnId(value string)

func (*ModelCallsInput) SetTurnIds

func (input *ModelCallsInput) SetTurnIds(value []string)

func (*ModelCallsInput) SetVisibilitySubject

func (input *ModelCallsInput) SetVisibilitySubject(value *string)

type ModelCallsInputHas

type ModelCallsInputHas struct {
	Internal          bool
	ReadMode          bool
	VisibilitySubject bool
	MessageId         bool
	MessageIds        bool
	ConversationId    bool
	TurnId            bool
	TurnIds           bool
	RunId             bool
	Provider          bool
	Model             bool
	Statuses          bool
	StartedAfter      bool
	StartedBefore     bool
	Fields            bool
	Limit             bool
	Offset            bool
}

type ModelCallsOutput

type ModelCallsOutput struct {
	Data []*ModelCallView `` /* 269-byte string literal not displayed */
}

ModelCallsOutput is the generated output scaffold for reader.

type ReaderComponent

type ReaderComponent struct {
	Contract xdatly.Component[ModelCallsInput, ModelCallsOutput] "" /* 151-byte string literal not displayed */
}

Component is the generated component scaffold for reader.

func (ReaderComponent) EmbedFS

func (ReaderComponent) EmbedFS() *embed.FS

func (ReaderComponent) EmbedNamespace

func (ReaderComponent) EmbedNamespace() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL