tools

package
v0.0.0-...-cdc720d Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTools

func GetTools(ctx context.Context) (tools []tool.BaseTool, err error)

func SafeInferTool

func SafeInferTool[T, D any](toolName, toolDesc string, i utils.InvokeFunc[T, D]) (tool.InvokableTool, error)

Types

type Activity

type Activity struct {
	Name               string       `json:"name"`
	Desc               string       `json:"desc"`
	Type               ActivityType `json:"type"`
	Location           string       `json:"location" jsonschema_description:"项目所属的区域"`
	MinHeight          int          `` /* 149-byte string literal not displayed */
	Duration           int          `` /* 199-byte string literal not displayed */
	TimeTable          []string     `` /* 170-byte string literal not displayed */
	OpenTime           string       `json:"open_time,omitempty" jsonschema_description:"一个项目开始运营的时间"`
	CloseTime          string       `json:"close_time,omitempty" jsonschema_description:"一个项目结束运营的时间"`
	RequireBooking     bool         `json:"require_booking,omitempty" jsonschema_description:"一个餐厅是否需要提前预约"`
	HasPriorityAccess  bool         `json:"has_priority_access,omitempty" jsonschema_description:"一个项目是否有高速票服务"`
	PriorityAccessCost int          `` /* 144-byte string literal not displayed */
	QueueTime          float64      `` /* 164-byte string literal not displayed */
}

Activity 主题乐园中的一个项目,可以是游乐设施、表演或餐厅.

type ActivityType

type ActivityType string
const (
	ActivityTypeAttraction  ActivityType = "attraction"
	ActivityTypePerformance ActivityType = "performance"
	ActivityTypeRestaurant  ActivityType = "restaurant"
	ActivityTypeOther       ActivityType = "other"
)

type ArrangePerformancesRequest

type ArrangePerformancesRequest struct {
	ChosenPerformances []string `json:"chosen_performances" jsonschema_description:"用户选择的演出名称列表"`
}

type ArrangePerformancesResponse

type ArrangePerformancesResponse struct {
	ArrangedPerformances    []PerformanceTime `` /* 213-byte string literal not displayed */
	UnsatisfiedPerformances []string          `` /* 135-byte string literal not displayed */
}

type AttractionQueueTime

type AttractionQueueTime struct {
	Name      string  `json:"name" jsonschema_description:"游乐项目的名称"`
	QueueTime float64 `json:"queue_time" jsonschema_description:"游乐项目的排队时间"`
}

AttractionQueueTime 主题乐园的一个游乐项目的排队时间.

type DestinationWalkingTime

type DestinationWalkingTime struct {
	DestinationName string  `json:"destination_name" jsonschema_description:"目标区域名称"`
	WalkTime        float64 `json:"walk_time" jsonschema_description:"步行到目标区域所需要的分钟数"`
}

type GetParkHourRequest

type GetParkHourRequest struct{}

type GetParkHourResponse

type GetParkHourResponse struct {
	OpenHour  string `json:"open_hour"`
	CloseHour string `json:"close_hour"`
}

func GetParkHour

func GetParkHour(_ context.Context, _ *GetParkHourRequest) (out *GetParkHourResponse, err error)

GetParkHour 获取乐园的营业时间.

type GetParkTicketPriceRequest

type GetParkTicketPriceRequest struct{}

type GetParkTicketPriceResponse

type GetParkTicketPriceResponse struct {
	Price string `json:"price" jsonschema_description:"乐园门票价格信息"`
}

type ListAdjacentLocationRequest

type ListAdjacentLocationRequest struct{}

type ListAdjacentLocationResponse

type ListAdjacentLocationResponse struct {
	AdjacencyList []LocationAdjacency `json:"adjacency_list" jsonschema_description:"所有区域的邻接区域"`
}

func GetAdjacentLocation

func GetAdjacentLocation(_ context.Context, _ *ListAdjacentLocationRequest) (out *ListAdjacentLocationResponse, err error)

GetAdjacentLocation 获取相邻的地点,可获取全部地点到其邻接地点的步行分钟数,也可获取单个地点到其邻接地点的步行分钟数.

type ListAttractionQueueTimeRequest

type ListAttractionQueueTimeRequest struct {
	Name     string `` /* 149-byte string literal not displayed */
	Location string `` /* 166-byte string literal not displayed */
}

type ListAttractionQueueTimeResponse

type ListAttractionQueueTimeResponse struct {
	QueueTime []AttractionQueueTime `json:"queue_time" jsonschema_description:"符合查询条件的所有游乐项目的排队时间"`
}

func GetQueueTime

GetQueueTime 获取游乐设施排队时间.

type ListAttractionRequest

type ListAttractionRequest struct {
	Name     string `` /* 134-byte string literal not displayed */
	Location string `` /* 151-byte string literal not displayed */
}

type ListAttractionResponse

type ListAttractionResponse struct {
	Attractions []Activity `json:"attractions" jsonschema_description:"符合查询条件的所有游乐项目的信息"`
}

func GetAttractionInfo

func GetAttractionInfo(_ context.Context, in *ListAttractionRequest) (out *ListAttractionResponse, err error)

GetAttractionInfo 获取游乐设施信息.

type ListLocationsRequest

type ListLocationsRequest struct{}

type ListLocationsResponse

type ListLocationsResponse struct {
	Locations []string `json:"locations"`
}

func ListLocations

func ListLocations(_ context.Context, _ *ListLocationsRequest) (out *ListLocationsResponse, err error)

type ListPerformanceRequest

type ListPerformanceRequest struct {
	Name     string `json:"name,omitempty" jsonschema_description:"演出的名称,如果不需要查询具体的某个演出,此处传空"`
	Location string `` /* 138-byte string literal not displayed */
}

type ListPerformanceResponse

type ListPerformanceResponse struct {
	Performances []Activity `json:"performances" jsonschema_description:"符合查询条件的所有演出的信息"`
}

func GetPerformanceInfo

func GetPerformanceInfo(_ context.Context, in *ListPerformanceRequest) (out *ListPerformanceResponse, err error)

GetPerformanceInfo 获取演出信息.

type ListRestaurantRequest

type ListRestaurantRequest struct {
	Name     string `json:"name,omitempty" jsonschema_description:"餐厅的名称,如果不需要查询具体的某个餐厅,此处传空"`
	Location string `` /* 139-byte string literal not displayed */
}

type ListRestaurantResponse

type ListRestaurantResponse struct {
	Restaurants []Activity `json:"restaurants" jsonschema_description:"符合查询条件的所有餐厅的信息"`
}

func GetRestaurantInfo

func GetRestaurantInfo(_ context.Context, in *ListRestaurantRequest) (out *ListRestaurantResponse, err error)

GetRestaurantInfo 获取餐厅信息.

type LocationAdjacency

type LocationAdjacency struct {
	FromLocationName                string                   `json:"from_location_name" jsonschema_description:"从哪个区域开始计算距离"`
	DestinationLocationWalkingTimes []DestinationWalkingTime `json:"destination_location_walking_times,omitempty" jsonschema_description:"相邻区域列表,包含走路的分钟数"`
}

LocationAdjacency 主题乐园的一个区域到相邻区域的步行时间.

type OnePerformanceStartTime

type OnePerformanceStartTime struct {
	PerformanceName string `json:"performance_name"`
	StartTime       string `json:"start_time" jsonschema_description:"选中的演出开始时间,格式如15:30"`
}

type PerformanceStartTimeValidateResult

type PerformanceStartTimeValidateResult struct {
	PerformanceName string `json:"performance_name"`
	StartTime       string `json:"start_time"`
	IsValid         bool   `json:"is_valid"`
	ErrMessage      string `json:"err_message"`
}

type PerformanceTime

type PerformanceTime struct {
	PerformanceName string `json:"performance_name" jsonschema_description:"演出名称"`
	StartTime       string `json:"start_time" jsonschema_description:"演出开始时间"`
	EndTime         string `json:"end_time" jsonschema_description:"演出结束时间"`
}

type PlanItem

type PlanItem struct {
	ActivityType         ActivityType `json:"activity_type" jsonschema_description:"活动类型,enum:attraction,enum:performance,enum:restaurant,enum:other"`
	StartTime            string       `json:"start_time" jsonschema_description:"活动开始时间,格式为15:04"`
	PerformanceStartTime *string      `` /* 161-byte string literal not displayed */
	Duration             *int         `` /* 197-byte string literal not displayed */
	QueueTime            *int         `` /* 180-byte string literal not displayed */
	Location             string       `` /* 189-byte string literal not displayed */
	ActivityName         string       `` /* 184-byte string literal not displayed */
}

type PlanItemValidationResult

type PlanItemValidationResult struct {
	PlanItem PlanItem `json:"plan_item" jsonschema_description:"完整一日计划其中的一个计划项"`
	IsValid  bool     `json:"is_valid"`
	ErrMsg   string   `json:"err_msg"`
}

type QueryEntranceRequest

type QueryEntranceRequest struct{}

type QueryEntranceResponse

type QueryEntranceResponse struct {
	EntranceLocation string `json:"entrance_location" jsonschema_description:"园区入口区域名称"`
}

func QueryEntrance

func QueryEntrance(_ context.Context, _ *QueryEntranceRequest) (out *QueryEntranceResponse, err error)

type ValidatePerformanceTimeTableRequest

type ValidatePerformanceTimeTableRequest struct {
	PerformancesStartTime []OnePerformanceStartTime `json:"performances_start_time" jsonschema_description:"用户选择的演出名称和开始时间"`
}

type ValidatePerformanceTimeTableResponse

type ValidatePerformanceTimeTableResponse struct {
	PerformancesValidateResult []PerformanceStartTimeValidateResult `json:"performances_validate_result" jsonschema_description:"验证结果,只包含有问题的表演"`
}

type ValidatePlanItemsRequest

type ValidatePlanItemsRequest struct {
	PlanItems []PlanItem `` /* 148-byte string literal not displayed */
}

type ValidatePlanItemsResponse

type ValidatePlanItemsResponse struct {
	ValidationResults []PlanItemValidationResult `` /* 150-byte string literal not displayed */
}

Jump to

Keyboard shortcuts

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