Documentation
¶
Overview ¶
Package models defines the data structures for the REST API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsZeroValue ¶
IsZeroValue checks if the val is the zero-ed value.
func ToSessionEvent ¶
ToSessionEvent maps Event data struct to session.Event
Types ¶
type CreateSessionRequest ¶
type Event ¶
type Event struct {
ID string `json:"id"`
Time int64 `json:"time"`
InvocationID string `json:"invocationId"`
Branch string `json:"branch"`
Author string `json:"author"`
Partial bool `json:"partial"`
LongRunningToolIDs []string `json:"longRunningToolIds"`
Content *genai.Content `json:"content"`
GroundingMetadata *genai.GroundingMetadata `json:"groundingMetadata"`
TurnComplete bool `json:"turnComplete"`
Interrupted bool `json:"interrupted"`
ErrorCode string `json:"errorCode"`
ErrorMessage string `json:"errorMessage"`
Actions EventActions `json:"actions"`
}
Event represents a single event in a session.
func FromSessionEvent ¶
FromSessionEvent maps session.Event to Event data struct
type EventActions ¶
type EventActions struct {
StateDelta map[string]any `json:"stateDelta"`
ArtifactDelta map[string]int64 `json:"artifactDelta"`
}
EventActions represent a data model for session.EventActions
type RunAgentRequest ¶
type RunAgentRequest struct {
AppName string `json:"appName"`
UserId string `json:"userId"`
SessionId string `json:"sessionId"`
NewMessage genai.Content `json:"newMessage"`
Streaming bool `json:"streaming,omitempty"`
StateDelta *map[string]any `json:"stateDelta,omitempty"`
}
func (RunAgentRequest) AssertRunAgentRequestRequired ¶
func (req RunAgentRequest) AssertRunAgentRequestRequired() error
AssertRunAgentRequestRequired checks if the required fields are not zero-ed
Click to show internal directories.
Click to hide internal directories.