Documentation
¶
Index ¶
- Variables
- func DefineComponent(ctx context.Context, srv *datly.Service) (*repository.Component, error)
- func DefineDeleteComponent(ctx context.Context, srv *datly.Service) (*repository.Component, error)
- type DeleteHandler
- type DeleteInput
- type DeleteOutput
- type Handler
- type Input
- type ModelCall
- func (m *ModelCall) SetCompletedAt(v time.Time)
- func (m *ModelCall) SetCompletionTokens(v int)
- func (m *ModelCall) SetCost(v float64)
- func (m *ModelCall) SetErrorCode(v string)
- func (m *ModelCall) SetErrorMessage(v string)
- func (m *ModelCall) SetIteration(v int)
- func (m *ModelCall) SetMessageID(v string)
- func (m *ModelCall) SetModel(v string)
- func (m *ModelCall) SetModelKind(v string)
- func (m *ModelCall) SetPromptCachedTokens(v int)
- func (m *ModelCall) SetPromptTokens(v int)
- func (m *ModelCall) SetProvider(v string)
- func (m *ModelCall) SetProviderRequestPayloadID(v string)
- func (m *ModelCall) SetProviderResponsePayloadID(v string)
- func (m *ModelCall) SetRequestPayloadID(v string)
- func (m *ModelCall) SetResponsePayloadID(v string)
- func (m *ModelCall) SetRunID(v string)
- func (m *ModelCall) SetStartedAt(v time.Time)
- func (m *ModelCall) SetStatus(v string)
- func (m *ModelCall) SetStreamPayloadID(v string)
- func (m *ModelCall) SetTotalTokens(v int)
- func (m *ModelCall) SetTraceID(v string)
- func (m *ModelCall) SetTurnID(v string)
- type ModelCallHas
- type MutableModelCallView
- type MutableModelCallViewOption
- func WithModelCallIteration(v int) MutableModelCallViewOption
- func WithModelCallMessageID(v string) MutableModelCallViewOption
- func WithModelCallModel(v string) MutableModelCallViewOption
- func WithModelCallModelKind(v string) MutableModelCallViewOption
- func WithModelCallProvider(v string) MutableModelCallViewOption
- func WithModelCallRunID(v string) MutableModelCallViewOption
- func WithModelCallStatus(v string) MutableModelCallViewOption
- func WithModelCallTurnID(v string) MutableModelCallViewOption
- type MutableModelCallViews
- type Output
Constants ¶
This section is empty.
Variables ¶
View Source
var FS embed.FS
View Source
var PackageName = "modelcall/write"
View Source
var PathURI = "/v1/api/agently/modelcall"
Functions ¶
func DefineComponent ¶
func DefineDeleteComponent ¶
Types ¶
type DeleteHandler ¶
type DeleteHandler struct{}
type DeleteInput ¶
type DeleteInput struct {
Rows []*MutableModelCallView `parameter:",kind=body,in=data"`
}
type DeleteOutput ¶
type Input ¶
type Input struct {
ModelCalls []*ModelCall `parameter:",kind=body,in=data"`
CurIDs *struct{ Values []string } `parameter:",kind=param,in=ModelCalls,dataType=modelcall/write.ModelCalls" codec:"structql,uri=sql/cur_ids.sql"`
Cur []*ModelCall `parameter:",kind=view,in=Cur" view:"Cur" sql:"uri=sql/cur_model_call.sql"`
CurByID map[string]*ModelCall
}
type ModelCall ¶
type ModelCall struct {
MessageID string `sqlx:"message_id,primaryKey" validate:"required"`
TurnID *string `sqlx:"turn_id" json:",omitempty"`
Provider string `sqlx:"provider" validate:"required"`
Model string `sqlx:"model" validate:"required"`
ModelKind string `sqlx:"model_kind" validate:"required"`
Status string `sqlx:"status" validate:"required"`
ErrorCode *string `sqlx:"error_code" json:",omitempty"`
ErrorMessage *string `sqlx:"error_message" json:",omitempty"`
PromptTokens *int `sqlx:"prompt_tokens" json:",omitempty"`
PromptCachedTokens *int `sqlx:"prompt_cached_tokens" json:",omitempty"`
CompletionTokens *int `sqlx:"completion_tokens" json:",omitempty"`
TotalTokens *int `sqlx:"total_tokens" json:",omitempty"`
PromptAudioTokens *int `sqlx:"prompt_audio_tokens" json:",omitempty"`
CompletionReasoningTokens *int `sqlx:"completion_reasoning_tokens" json:",omitempty"`
CompletionAudioTokens *int `sqlx:"completion_audio_tokens" json:",omitempty"`
CompletionAcceptedPredictionTokens *int `sqlx:"completion_accepted_prediction_tokens" json:",omitempty"`
CompletionRejectedPredictionTokens *int `sqlx:"completion_rejected_prediction_tokens" json:",omitempty"`
FinishReason *string `sqlx:"finish_reason" json:",omitempty"`
StartedAt *time.Time `sqlx:"started_at" json:",omitempty"`
CompletedAt *time.Time `sqlx:"completed_at" json:",omitempty"`
LatencyMS *int `sqlx:"latency_ms" json:",omitempty"`
Cost *float64 `sqlx:"cost" json:",omitempty"`
TraceID *string `sqlx:"trace_id" json:",omitempty"`
SpanID *string `sqlx:"span_id" json:",omitempty"`
RequestPayloadID *string `sqlx:"request_payload_id" json:",omitempty"`
ResponsePayloadID *string `sqlx:"response_payload_id" json:",omitempty"`
ProviderRequestPayloadID *string `sqlx:"provider_request_payload_id" json:",omitempty"`
ProviderResponsePayloadID *string `sqlx:"provider_response_payload_id" json:",omitempty"`
StreamPayloadID *string `sqlx:"stream_payload_id" json:",omitempty"`
RunID *string `sqlx:"run_id" json:",omitempty"`
Iteration *int `sqlx:"iteration" json:",omitempty"`
Has *ModelCallHas `setMarker:"true" format:"-" sqlx:"-" diff:"-" json:"-"`
}
func (*ModelCall) SetCompletedAt ¶
func (*ModelCall) SetCompletionTokens ¶
func (*ModelCall) SetErrorCode ¶
func (*ModelCall) SetErrorMessage ¶
func (*ModelCall) SetIteration ¶
func (*ModelCall) SetMessageID ¶
func (*ModelCall) SetModelKind ¶
func (*ModelCall) SetPromptCachedTokens ¶
func (*ModelCall) SetPromptTokens ¶
func (*ModelCall) SetProvider ¶
func (*ModelCall) SetProviderRequestPayloadID ¶
func (*ModelCall) SetProviderResponsePayloadID ¶
func (*ModelCall) SetRequestPayloadID ¶
func (*ModelCall) SetResponsePayloadID ¶
func (*ModelCall) SetStartedAt ¶
func (*ModelCall) SetStreamPayloadID ¶
func (*ModelCall) SetTotalTokens ¶
func (*ModelCall) SetTraceID ¶
type ModelCallHas ¶
type ModelCallHas struct {
MessageID bool
TurnID bool
Provider bool
Model bool
ModelKind bool
ErrorCode bool
ErrorMessage bool
PromptTokens bool
PromptCachedTokens bool
CompletionTokens bool
TotalTokens bool
PromptAudioTokens bool
CompletionReasoningTokens bool
CompletionAudioTokens bool
CompletionAcceptedPredictionTokens bool
CompletionRejectedPredictionTokens bool
FinishReason bool
StartedAt bool
CompletedAt bool
LatencyMS bool
Cost bool
TraceID bool
SpanID bool
RequestPayloadID bool
ResponsePayloadID bool
ProviderRequestPayloadID bool
ProviderResponsePayloadID bool
StreamPayloadID bool
RunID bool
Iteration bool
Status bool
}
type MutableModelCallView ¶
type MutableModelCallView = ModelCall
func NewMutableModelCallView ¶
func NewMutableModelCallView(opts ...MutableModelCallViewOption) *MutableModelCallView
type MutableModelCallViewOption ¶
type MutableModelCallViewOption func(*MutableModelCallView)
func WithModelCallIteration ¶
func WithModelCallIteration(v int) MutableModelCallViewOption
func WithModelCallMessageID ¶
func WithModelCallMessageID(v string) MutableModelCallViewOption
func WithModelCallModel ¶
func WithModelCallModel(v string) MutableModelCallViewOption
func WithModelCallModelKind ¶
func WithModelCallModelKind(v string) MutableModelCallViewOption
func WithModelCallProvider ¶
func WithModelCallProvider(v string) MutableModelCallViewOption
func WithModelCallRunID ¶
func WithModelCallRunID(v string) MutableModelCallViewOption
func WithModelCallStatus ¶
func WithModelCallStatus(v string) MutableModelCallViewOption
func WithModelCallTurnID ¶
func WithModelCallTurnID(v string) MutableModelCallViewOption
type MutableModelCallViews ¶
type MutableModelCallViews struct {
ModelCalls []*MutableModelCallView
}
func NewMutableModelCallViews ¶
func NewMutableModelCallViews(rows ...*MutableModelCallView) *MutableModelCallViews
Click to show internal directories.
Click to hide internal directories.