v1

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var APIUsageService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "llmariner.apiusage.server.v1.APIUsageService",
	HandlerType: (*APIUsageServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAggregatedSummary",
			Handler:    _APIUsageService_GetAggregatedSummary_Handler,
		},
		{
			MethodName: "GetUsageData",
			Handler:    _APIUsageService_GetUsageData_Handler,
		},
		{
			MethodName: "ListUsageData",
			Handler:    _APIUsageService_ListUsageData_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/usage_server.proto",
}

APIUsageService_ServiceDesc is the grpc.ServiceDesc for APIUsageService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var CollectionInternalService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "llmariner.apiusage.server.v1.CollectionInternalService",
	HandlerType: (*CollectionInternalServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateUsage",
			Handler:    _CollectionInternalService_CreateUsage_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/collector_server.proto",
}

CollectionInternalService_ServiceDesc is the grpc.ServiceDesc for CollectionInternalService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_api_v1_collector_server_proto protoreflect.FileDescriptor
View Source
var File_api_v1_usage_server_proto protoreflect.FileDescriptor

Functions

func RegisterAPIUsageServiceHandler added in v1.3.0

func RegisterAPIUsageServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAPIUsageServiceHandler registers the http handlers for service APIUsageService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAPIUsageServiceHandlerClient added in v1.3.0

func RegisterAPIUsageServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client APIUsageServiceClient) error

RegisterAPIUsageServiceHandlerClient registers the http handlers for service APIUsageService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "APIUsageServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "APIUsageServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "APIUsageServiceClient" to call the correct interceptors.

func RegisterAPIUsageServiceHandlerFromEndpoint added in v1.3.0

func RegisterAPIUsageServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAPIUsageServiceHandlerFromEndpoint is same as RegisterAPIUsageServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAPIUsageServiceHandlerServer added in v1.3.0

func RegisterAPIUsageServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server APIUsageServiceServer) error

RegisterAPIUsageServiceHandlerServer registers the http handlers for service APIUsageService to "mux". UnaryRPC :call APIUsageServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAPIUsageServiceHandlerFromEndpoint instead.

func RegisterAPIUsageServiceServer added in v0.10.0

func RegisterAPIUsageServiceServer(s grpc.ServiceRegistrar, srv APIUsageServiceServer)

func RegisterCollectionInternalServiceServer

func RegisterCollectionInternalServiceServer(s grpc.ServiceRegistrar, srv CollectionInternalServiceServer)

Types

type APIUsageServiceClient added in v0.10.0

type APIUsageServiceClient interface {
	GetAggregatedSummary(ctx context.Context, in *GetAggregatedSummaryRequest, opts ...grpc.CallOption) (*AggregatedSummary, error)
	GetUsageData(ctx context.Context, in *GetUsageDataRequest, opts ...grpc.CallOption) (*UsageData, error)
	ListUsageData(ctx context.Context, in *ListUsageDataRequest, opts ...grpc.CallOption) (*ListUsageDataResponse, error)
}

APIUsageServiceClient is the client API for APIUsageService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewAPIUsageServiceClient added in v0.10.0

func NewAPIUsageServiceClient(cc grpc.ClientConnInterface) APIUsageServiceClient

type APIUsageServiceServer added in v0.10.0

type APIUsageServiceServer interface {
	GetAggregatedSummary(context.Context, *GetAggregatedSummaryRequest) (*AggregatedSummary, error)
	GetUsageData(context.Context, *GetUsageDataRequest) (*UsageData, error)
	ListUsageData(context.Context, *ListUsageDataRequest) (*ListUsageDataResponse, error)
	// contains filtered or unexported methods
}

APIUsageServiceServer is the server API for APIUsageService service. All implementations must embed UnimplementedAPIUsageServiceServer for forward compatibility

type AggregatedSummary added in v0.10.0

type AggregatedSummary struct {
	Summary         *Summary   `protobuf:"bytes,1,opt,name=summary,proto3" json:"summary,omitempty"`
	MethodSummaries []*Summary `protobuf:"bytes,2,rep,name=method_summaries,json=methodSummaries,proto3" json:"method_summaries,omitempty"`
	// contains filtered or unexported fields
}

func (*AggregatedSummary) Descriptor deprecated added in v0.10.0

func (*AggregatedSummary) Descriptor() ([]byte, []int)

Deprecated: Use AggregatedSummary.ProtoReflect.Descriptor instead.

func (*AggregatedSummary) GetMethodSummaries added in v0.10.0

func (x *AggregatedSummary) GetMethodSummaries() []*Summary

func (*AggregatedSummary) GetSummary added in v0.10.0

func (x *AggregatedSummary) GetSummary() *Summary

func (*AggregatedSummary) ProtoMessage added in v0.10.0

func (*AggregatedSummary) ProtoMessage()

func (*AggregatedSummary) ProtoReflect added in v0.10.0

func (x *AggregatedSummary) ProtoReflect() protoreflect.Message

func (*AggregatedSummary) Reset added in v0.10.0

func (x *AggregatedSummary) Reset()

func (*AggregatedSummary) String added in v0.10.0

func (x *AggregatedSummary) String() string

type CollectionInternalServiceClient

type CollectionInternalServiceClient interface {
	CreateUsage(ctx context.Context, in *CreateUsageRequest, opts ...grpc.CallOption) (*Usage, error)
}

CollectionInternalServiceClient is the client API for CollectionInternalService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type CollectionInternalServiceServer

type CollectionInternalServiceServer interface {
	CreateUsage(context.Context, *CreateUsageRequest) (*Usage, error)
	// contains filtered or unexported methods
}

CollectionInternalServiceServer is the server API for CollectionInternalService service. All implementations must embed UnimplementedCollectionInternalServiceServer for forward compatibility

type CreateChatCompletion added in v0.12.0

type CreateChatCompletion struct {
	ModelId string `protobuf:"bytes,1,opt,name=model_id,json=modelId,proto3" json:"model_id,omitempty"`
	// How quickly users start seeing the model's output after entering their query.
	TimeToFirstTokenMs int32 `protobuf:"varint,2,opt,name=time_to_first_token_ms,json=timeToFirstTokenMs,proto3" json:"time_to_first_token_ms,omitempty"`
	// The number off tokens in the prompt.
	PromptTokens int32 `protobuf:"varint,3,opt,name=prompt_tokens,json=promptTokens,proto3" json:"prompt_tokens,omitempty"`
	// The number of tokens in the completion.
	CompletionTokens int32 `protobuf:"varint,4,opt,name=completion_tokens,json=completionTokens,proto3" json:"completion_tokens,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateChatCompletion) Descriptor deprecated added in v0.12.0

func (*CreateChatCompletion) Descriptor() ([]byte, []int)

Deprecated: Use CreateChatCompletion.ProtoReflect.Descriptor instead.

func (*CreateChatCompletion) GetCompletionTokens added in v0.12.0

func (x *CreateChatCompletion) GetCompletionTokens() int32

func (*CreateChatCompletion) GetModelId added in v0.12.0

func (x *CreateChatCompletion) GetModelId() string

func (*CreateChatCompletion) GetPromptTokens added in v0.12.0

func (x *CreateChatCompletion) GetPromptTokens() int32

func (*CreateChatCompletion) GetTimeToFirstTokenMs added in v0.12.0

func (x *CreateChatCompletion) GetTimeToFirstTokenMs() int32

func (*CreateChatCompletion) ProtoMessage added in v0.12.0

func (*CreateChatCompletion) ProtoMessage()

func (*CreateChatCompletion) ProtoReflect added in v0.12.0

func (x *CreateChatCompletion) ProtoReflect() protoreflect.Message

func (*CreateChatCompletion) Reset added in v0.12.0

func (x *CreateChatCompletion) Reset()

func (*CreateChatCompletion) String added in v0.12.0

func (x *CreateChatCompletion) String() string

type CreateCompletion added in v0.12.0

type CreateCompletion struct {
	ModelId string `protobuf:"bytes,1,opt,name=model_id,json=modelId,proto3" json:"model_id,omitempty"`
	// How quickly users start seeing the model's output after entering their query.
	TimeToFirstTokenMs int32 `protobuf:"varint,2,opt,name=time_to_first_token_ms,json=timeToFirstTokenMs,proto3" json:"time_to_first_token_ms,omitempty"`
	// The number off tokens in the prompt.
	PromptTokens int32 `protobuf:"varint,3,opt,name=prompt_tokens,json=promptTokens,proto3" json:"prompt_tokens,omitempty"`
	// The number of tokens in the completion.
	CompletionTokens int32 `protobuf:"varint,4,opt,name=completion_tokens,json=completionTokens,proto3" json:"completion_tokens,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateCompletion) Descriptor deprecated added in v0.12.0

func (*CreateCompletion) Descriptor() ([]byte, []int)

Deprecated: Use CreateCompletion.ProtoReflect.Descriptor instead.

func (*CreateCompletion) GetCompletionTokens added in v0.12.0

func (x *CreateCompletion) GetCompletionTokens() int32

func (*CreateCompletion) GetModelId added in v0.12.0

func (x *CreateCompletion) GetModelId() string

func (*CreateCompletion) GetPromptTokens added in v0.12.0

func (x *CreateCompletion) GetPromptTokens() int32

func (*CreateCompletion) GetTimeToFirstTokenMs added in v0.12.0

func (x *CreateCompletion) GetTimeToFirstTokenMs() int32

func (*CreateCompletion) ProtoMessage added in v0.12.0

func (*CreateCompletion) ProtoMessage()

func (*CreateCompletion) ProtoReflect added in v0.12.0

func (x *CreateCompletion) ProtoReflect() protoreflect.Message

func (*CreateCompletion) Reset added in v0.12.0

func (x *CreateCompletion) Reset()

func (*CreateCompletion) String added in v0.12.0

func (x *CreateCompletion) String() string

type CreateUsageRequest

type CreateUsageRequest struct {
	Records []*UsageRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUsageRequest) Descriptor deprecated

func (*CreateUsageRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateUsageRequest.ProtoReflect.Descriptor instead.

func (*CreateUsageRequest) GetRecords

func (x *CreateUsageRequest) GetRecords() []*UsageRecord

func (*CreateUsageRequest) ProtoMessage

func (*CreateUsageRequest) ProtoMessage()

func (*CreateUsageRequest) ProtoReflect

func (x *CreateUsageRequest) ProtoReflect() protoreflect.Message

func (*CreateUsageRequest) Reset

func (x *CreateUsageRequest) Reset()

func (*CreateUsageRequest) String

func (x *CreateUsageRequest) String() string

type GetAggregatedSummaryRequest added in v0.10.0

type GetAggregatedSummaryRequest struct {
	TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
	// star_time is the UNIX timestamp for the summary start time (inclusive).
	// If start_time is not provided, the default is the 24 hours before end_time.
	StartTime int64 `protobuf:"varint,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// end_time is the UNIX timestamp for the summary end time (exclusive).
	// If end_time is not provided, the default is the current time.
	EndTime int64 `protobuf:"varint,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAggregatedSummaryRequest) Descriptor deprecated added in v0.10.0

func (*GetAggregatedSummaryRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetAggregatedSummaryRequest.ProtoReflect.Descriptor instead.

func (*GetAggregatedSummaryRequest) GetEndTime added in v0.10.0

func (x *GetAggregatedSummaryRequest) GetEndTime() int64

func (*GetAggregatedSummaryRequest) GetStartTime added in v0.10.0

func (x *GetAggregatedSummaryRequest) GetStartTime() int64

func (*GetAggregatedSummaryRequest) GetTenantId added in v0.10.0

func (x *GetAggregatedSummaryRequest) GetTenantId() string

func (*GetAggregatedSummaryRequest) ProtoMessage added in v0.10.0

func (*GetAggregatedSummaryRequest) ProtoMessage()

func (*GetAggregatedSummaryRequest) ProtoReflect added in v0.10.0

func (*GetAggregatedSummaryRequest) Reset added in v0.10.0

func (x *GetAggregatedSummaryRequest) Reset()

func (*GetAggregatedSummaryRequest) String added in v0.10.0

func (x *GetAggregatedSummaryRequest) String() string

type GetUsageDataRequest added in v1.3.0

type GetUsageDataRequest struct {

	// start_time is the UNIX timestamp for the data start time (inclusive).
	// If start_time is not provided, the default is the 24 hours before end_time.
	StartTime int64 `protobuf:"varint,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// end_time is the UNIX timestamp for the data end time (exclusive).
	// If end_time is not provided, the default is the current time.
	EndTime int64                       `protobuf:"varint,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	Filter  *GetUsageDataRequest_Filter `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
	// after is the identifier for the last datum from the previous pagination request.
	After string `protobuf:"bytes,4,opt,name=after,proto3" json:"after,omitempty"`
	// limit is the number of entries to retrieve.
	Limit int32 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUsageDataRequest) Descriptor deprecated added in v1.3.0

func (*GetUsageDataRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetUsageDataRequest.ProtoReflect.Descriptor instead.

func (*GetUsageDataRequest) GetAfter added in v1.3.0

func (x *GetUsageDataRequest) GetAfter() string

func (*GetUsageDataRequest) GetEndTime added in v1.3.0

func (x *GetUsageDataRequest) GetEndTime() int64

func (*GetUsageDataRequest) GetFilter added in v1.3.0

func (*GetUsageDataRequest) GetLimit added in v1.3.0

func (x *GetUsageDataRequest) GetLimit() int32

func (*GetUsageDataRequest) GetStartTime added in v1.3.0

func (x *GetUsageDataRequest) GetStartTime() int64

func (*GetUsageDataRequest) ProtoMessage added in v1.3.0

func (*GetUsageDataRequest) ProtoMessage()

func (*GetUsageDataRequest) ProtoReflect added in v1.3.0

func (x *GetUsageDataRequest) ProtoReflect() protoreflect.Message

func (*GetUsageDataRequest) Reset added in v1.3.0

func (x *GetUsageDataRequest) Reset()

func (*GetUsageDataRequest) String added in v1.3.0

func (x *GetUsageDataRequest) String() string

type GetUsageDataRequest_Filter added in v1.3.0

type GetUsageDataRequest_Filter struct {
	ApiKeys []string `protobuf:"bytes,1,rep,name=api_keys,json=apiKeys,proto3" json:"api_keys,omitempty"`
	Models  []string `protobuf:"bytes,2,rep,name=models,proto3" json:"models,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUsageDataRequest_Filter) Descriptor deprecated added in v1.3.0

func (*GetUsageDataRequest_Filter) Descriptor() ([]byte, []int)

Deprecated: Use GetUsageDataRequest_Filter.ProtoReflect.Descriptor instead.

func (*GetUsageDataRequest_Filter) GetApiKeys added in v1.3.0

func (x *GetUsageDataRequest_Filter) GetApiKeys() []string

func (*GetUsageDataRequest_Filter) GetModels added in v1.3.0

func (x *GetUsageDataRequest_Filter) GetModels() []string

func (*GetUsageDataRequest_Filter) ProtoMessage added in v1.3.0

func (*GetUsageDataRequest_Filter) ProtoMessage()

func (*GetUsageDataRequest_Filter) ProtoReflect added in v1.3.0

func (*GetUsageDataRequest_Filter) Reset added in v1.3.0

func (x *GetUsageDataRequest_Filter) Reset()

func (*GetUsageDataRequest_Filter) String added in v1.3.0

func (x *GetUsageDataRequest_Filter) String() string

type ListUsageDataRequest added in v1.3.0

type ListUsageDataRequest struct {

	// start_time is the UNIX timestamp for the data start time (inclusive).
	// If start_time is not provided, the default is the 24 hours before end_time.
	StartTime int64 `protobuf:"varint,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// end_time is the UNIX timestamp for the data end time (exclusive).
	// If end_time is not provided, the default is the current time.
	EndTime int64 `protobuf:"varint,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	// contains filtered or unexported fields
}

func (*ListUsageDataRequest) Descriptor deprecated added in v1.3.0

func (*ListUsageDataRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListUsageDataRequest.ProtoReflect.Descriptor instead.

func (*ListUsageDataRequest) GetEndTime added in v1.3.0

func (x *ListUsageDataRequest) GetEndTime() int64

func (*ListUsageDataRequest) GetStartTime added in v1.3.0

func (x *ListUsageDataRequest) GetStartTime() int64

func (*ListUsageDataRequest) ProtoMessage added in v1.3.0

func (*ListUsageDataRequest) ProtoMessage()

func (*ListUsageDataRequest) ProtoReflect added in v1.3.0

func (x *ListUsageDataRequest) ProtoReflect() protoreflect.Message

func (*ListUsageDataRequest) Reset added in v1.3.0

func (x *ListUsageDataRequest) Reset()

func (*ListUsageDataRequest) String added in v1.3.0

func (x *ListUsageDataRequest) String() string

type ListUsageDataResponse added in v1.3.0

type ListUsageDataResponse struct {
	Usages []*UsageDataByGroup `protobuf:"bytes,1,rep,name=usages,proto3" json:"usages,omitempty"`
	// contains filtered or unexported fields
}

func (*ListUsageDataResponse) Descriptor deprecated added in v1.3.0

func (*ListUsageDataResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListUsageDataResponse.ProtoReflect.Descriptor instead.

func (*ListUsageDataResponse) GetUsages added in v1.3.0

func (x *ListUsageDataResponse) GetUsages() []*UsageDataByGroup

func (*ListUsageDataResponse) ProtoMessage added in v1.3.0

func (*ListUsageDataResponse) ProtoMessage()

func (*ListUsageDataResponse) ProtoReflect added in v1.3.0

func (x *ListUsageDataResponse) ProtoReflect() protoreflect.Message

func (*ListUsageDataResponse) Reset added in v1.3.0

func (x *ListUsageDataResponse) Reset()

func (*ListUsageDataResponse) String added in v1.3.0

func (x *ListUsageDataResponse) String() string

type Summary added in v0.10.0

type Summary struct {
	Method          string  `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
	TotalRequests   int64   `protobuf:"varint,2,opt,name=total_requests,json=totalRequests,proto3" json:"total_requests,omitempty"`
	SuccessRequests int64   `protobuf:"varint,3,opt,name=success_requests,json=successRequests,proto3" json:"success_requests,omitempty"`
	FailureRequests int64   `protobuf:"varint,4,opt,name=failure_requests,json=failureRequests,proto3" json:"failure_requests,omitempty"`
	AverageLatency  float64 `protobuf:"fixed64,5,opt,name=average_latency,json=averageLatency,proto3" json:"average_latency,omitempty"`
	// contains filtered or unexported fields
}

func (*Summary) Descriptor deprecated added in v0.10.0

func (*Summary) Descriptor() ([]byte, []int)

Deprecated: Use Summary.ProtoReflect.Descriptor instead.

func (*Summary) GetAverageLatency added in v0.10.0

func (x *Summary) GetAverageLatency() float64

func (*Summary) GetFailureRequests added in v0.10.0

func (x *Summary) GetFailureRequests() int64

func (*Summary) GetMethod added in v0.10.0

func (x *Summary) GetMethod() string

func (*Summary) GetSuccessRequests added in v0.10.0

func (x *Summary) GetSuccessRequests() int64

func (*Summary) GetTotalRequests added in v0.10.0

func (x *Summary) GetTotalRequests() int64

func (*Summary) ProtoMessage added in v0.10.0

func (*Summary) ProtoMessage()

func (*Summary) ProtoReflect added in v0.10.0

func (x *Summary) ProtoReflect() protoreflect.Message

func (*Summary) Reset added in v0.10.0

func (x *Summary) Reset()

func (*Summary) String added in v0.10.0

func (x *Summary) String() string

type UnimplementedAPIUsageServiceServer added in v0.10.0

type UnimplementedAPIUsageServiceServer struct {
}

UnimplementedAPIUsageServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAPIUsageServiceServer) GetAggregatedSummary added in v0.10.0

func (UnimplementedAPIUsageServiceServer) GetUsageData added in v1.3.0

func (UnimplementedAPIUsageServiceServer) ListUsageData added in v1.3.0

type UnimplementedCollectionInternalServiceServer

type UnimplementedCollectionInternalServiceServer struct {
}

UnimplementedCollectionInternalServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCollectionInternalServiceServer) CreateUsage

type UnsafeAPIUsageServiceServer added in v0.10.0

type UnsafeAPIUsageServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeAPIUsageServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to APIUsageServiceServer will result in compilation errors.

type UnsafeCollectionInternalServiceServer

type UnsafeCollectionInternalServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeCollectionInternalServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CollectionInternalServiceServer will result in compilation errors.

type Usage

type Usage struct {
	// contains filtered or unexported fields
}

func (*Usage) Descriptor deprecated

func (*Usage) Descriptor() ([]byte, []int)

Deprecated: Use Usage.ProtoReflect.Descriptor instead.

func (*Usage) ProtoMessage

func (*Usage) ProtoMessage()

func (*Usage) ProtoReflect

func (x *Usage) ProtoReflect() protoreflect.Message

func (*Usage) Reset

func (x *Usage) Reset()

func (*Usage) String

func (x *Usage) String() string

type UsageData added in v1.3.0

type UsageData struct {
	DataPoints []*UsageDataPoint `protobuf:"bytes,1,rep,name=data_points,json=dataPoints,proto3" json:"data_points,omitempty"`
	// contains filtered or unexported fields
}

func (*UsageData) Descriptor deprecated added in v1.3.0

func (*UsageData) Descriptor() ([]byte, []int)

Deprecated: Use UsageData.ProtoReflect.Descriptor instead.

func (*UsageData) GetDataPoints added in v1.3.0

func (x *UsageData) GetDataPoints() []*UsageDataPoint

func (*UsageData) ProtoMessage added in v1.3.0

func (*UsageData) ProtoMessage()

func (*UsageData) ProtoReflect added in v1.3.0

func (x *UsageData) ProtoReflect() protoreflect.Message

func (*UsageData) Reset added in v1.3.0

func (x *UsageData) Reset()

func (*UsageData) String added in v1.3.0

func (x *UsageData) String() string

type UsageDataByGroup added in v1.3.0

type UsageDataByGroup struct {
	UserId                string  `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	ApiKeyId              string  `protobuf:"bytes,2,opt,name=api_key_id,json=apiKeyId,proto3" json:"api_key_id,omitempty"`
	ModelId               string  `protobuf:"bytes,3,opt,name=model_id,json=modelId,proto3" json:"model_id,omitempty"`
	TotalRequests         int64   `protobuf:"varint,4,opt,name=total_requests,json=totalRequests,proto3" json:"total_requests,omitempty"`
	AvgLatencyMs          float64 `protobuf:"fixed64,5,opt,name=avg_latency_ms,json=avgLatencyMs,proto3" json:"avg_latency_ms,omitempty"`
	AvgTimeToFirstTokenMs float64 `` /* 134-byte string literal not displayed */
	TotalPromptTokens     int64   `protobuf:"varint,7,opt,name=total_prompt_tokens,json=totalPromptTokens,proto3" json:"total_prompt_tokens,omitempty"`
	TotalCompletionTokens int64   `` /* 127-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*UsageDataByGroup) Descriptor deprecated added in v1.3.0

func (*UsageDataByGroup) Descriptor() ([]byte, []int)

Deprecated: Use UsageDataByGroup.ProtoReflect.Descriptor instead.

func (*UsageDataByGroup) GetApiKeyId added in v1.3.0

func (x *UsageDataByGroup) GetApiKeyId() string

func (*UsageDataByGroup) GetAvgLatencyMs added in v1.3.0

func (x *UsageDataByGroup) GetAvgLatencyMs() float64

func (*UsageDataByGroup) GetAvgTimeToFirstTokenMs added in v1.3.0

func (x *UsageDataByGroup) GetAvgTimeToFirstTokenMs() float64

func (*UsageDataByGroup) GetModelId added in v1.3.0

func (x *UsageDataByGroup) GetModelId() string

func (*UsageDataByGroup) GetTotalCompletionTokens added in v1.3.0

func (x *UsageDataByGroup) GetTotalCompletionTokens() int64

func (*UsageDataByGroup) GetTotalPromptTokens added in v1.3.0

func (x *UsageDataByGroup) GetTotalPromptTokens() int64

func (*UsageDataByGroup) GetTotalRequests added in v1.3.0

func (x *UsageDataByGroup) GetTotalRequests() int64

func (*UsageDataByGroup) GetUserId added in v1.3.0

func (x *UsageDataByGroup) GetUserId() string

func (*UsageDataByGroup) ProtoMessage added in v1.3.0

func (*UsageDataByGroup) ProtoMessage()

func (*UsageDataByGroup) ProtoReflect added in v1.3.0

func (x *UsageDataByGroup) ProtoReflect() protoreflect.Message

func (*UsageDataByGroup) Reset added in v1.3.0

func (x *UsageDataByGroup) Reset()

func (*UsageDataByGroup) String added in v1.3.0

func (x *UsageDataByGroup) String() string

type UsageDataPoint added in v1.3.0

type UsageDataPoint struct {
	UserId             string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Organization       string `protobuf:"bytes,2,opt,name=organization,proto3" json:"organization,omitempty"`
	Project            string `protobuf:"bytes,3,opt,name=project,proto3" json:"project,omitempty"`
	ApiKeyId           string `protobuf:"bytes,4,opt,name=api_key_id,json=apiKeyId,proto3" json:"api_key_id,omitempty"`
	ApiMethod          string `protobuf:"bytes,5,opt,name=api_method,json=apiMethod,proto3" json:"api_method,omitempty"`
	StatusCode         int32  `protobuf:"varint,6,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	Timestamp          int64  `protobuf:"varint,7,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	LatencyMs          int32  `protobuf:"varint,8,opt,name=latency_ms,json=latencyMs,proto3" json:"latency_ms,omitempty"`
	ModelId            string `protobuf:"bytes,9,opt,name=model_id,json=modelId,proto3" json:"model_id,omitempty"`
	TimeToFirstTokenMs int32  `protobuf:"varint,10,opt,name=time_to_first_token_ms,json=timeToFirstTokenMs,proto3" json:"time_to_first_token_ms,omitempty"`
	PromptTokens       int32  `protobuf:"varint,11,opt,name=prompt_tokens,json=promptTokens,proto3" json:"prompt_tokens,omitempty"`
	CompletionTokens   int32  `protobuf:"varint,12,opt,name=completion_tokens,json=completionTokens,proto3" json:"completion_tokens,omitempty"`
	// contains filtered or unexported fields
}

func (*UsageDataPoint) Descriptor deprecated added in v1.3.0

func (*UsageDataPoint) Descriptor() ([]byte, []int)

Deprecated: Use UsageDataPoint.ProtoReflect.Descriptor instead.

func (*UsageDataPoint) GetApiKeyId added in v1.3.0

func (x *UsageDataPoint) GetApiKeyId() string

func (*UsageDataPoint) GetApiMethod added in v1.3.0

func (x *UsageDataPoint) GetApiMethod() string

func (*UsageDataPoint) GetCompletionTokens added in v1.3.0

func (x *UsageDataPoint) GetCompletionTokens() int32

func (*UsageDataPoint) GetLatencyMs added in v1.3.0

func (x *UsageDataPoint) GetLatencyMs() int32

func (*UsageDataPoint) GetModelId added in v1.3.0

func (x *UsageDataPoint) GetModelId() string

func (*UsageDataPoint) GetOrganization added in v1.3.0

func (x *UsageDataPoint) GetOrganization() string

func (*UsageDataPoint) GetProject added in v1.3.0

func (x *UsageDataPoint) GetProject() string

func (*UsageDataPoint) GetPromptTokens added in v1.3.0

func (x *UsageDataPoint) GetPromptTokens() int32

func (*UsageDataPoint) GetStatusCode added in v1.3.0

func (x *UsageDataPoint) GetStatusCode() int32

func (*UsageDataPoint) GetTimeToFirstTokenMs added in v1.3.0

func (x *UsageDataPoint) GetTimeToFirstTokenMs() int32

func (*UsageDataPoint) GetTimestamp added in v1.3.0

func (x *UsageDataPoint) GetTimestamp() int64

func (*UsageDataPoint) GetUserId added in v1.3.0

func (x *UsageDataPoint) GetUserId() string

func (*UsageDataPoint) ProtoMessage added in v1.3.0

func (*UsageDataPoint) ProtoMessage()

func (*UsageDataPoint) ProtoReflect added in v1.3.0

func (x *UsageDataPoint) ProtoReflect() protoreflect.Message

func (*UsageDataPoint) Reset added in v1.3.0

func (x *UsageDataPoint) Reset()

func (*UsageDataPoint) String added in v1.3.0

func (x *UsageDataPoint) String() string

type UsageDetails added in v0.12.0

type UsageDetails struct {

	// Types that are assignable to Message:
	//
	//	*UsageDetails_CreateChatCompletion
	//	*UsageDetails_CreateCompletion
	Message isUsageDetails_Message `protobuf_oneof:"message"`
	// contains filtered or unexported fields
}

func (*UsageDetails) Descriptor deprecated added in v0.12.0

func (*UsageDetails) Descriptor() ([]byte, []int)

Deprecated: Use UsageDetails.ProtoReflect.Descriptor instead.

func (*UsageDetails) GetCreateChatCompletion added in v0.12.0

func (x *UsageDetails) GetCreateChatCompletion() *CreateChatCompletion

func (*UsageDetails) GetCreateCompletion added in v0.12.0

func (x *UsageDetails) GetCreateCompletion() *CreateCompletion

func (*UsageDetails) GetMessage added in v0.12.0

func (m *UsageDetails) GetMessage() isUsageDetails_Message

func (*UsageDetails) ProtoMessage added in v0.12.0

func (*UsageDetails) ProtoMessage()

func (*UsageDetails) ProtoReflect added in v0.12.0

func (x *UsageDetails) ProtoReflect() protoreflect.Message

func (*UsageDetails) Reset added in v0.12.0

func (x *UsageDetails) Reset()

func (*UsageDetails) String added in v0.12.0

func (x *UsageDetails) String() string

type UsageDetails_CreateChatCompletion added in v0.12.0

type UsageDetails_CreateChatCompletion struct {
	CreateChatCompletion *CreateChatCompletion `protobuf:"bytes,1,opt,name=create_chat_completion,json=createChatCompletion,proto3,oneof"`
}

type UsageDetails_CreateCompletion added in v0.12.0

type UsageDetails_CreateCompletion struct {
	CreateCompletion *CreateCompletion `protobuf:"bytes,2,opt,name=create_completion,json=createCompletion,proto3,oneof"`
}

type UsageRecord

type UsageRecord struct {

	// user ID is the internal user ID.
	UserId       string        `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Tenant       string        `protobuf:"bytes,2,opt,name=tenant,proto3" json:"tenant,omitempty"`
	Organization string        `protobuf:"bytes,3,opt,name=organization,proto3" json:"organization,omitempty"`
	Project      string        `protobuf:"bytes,4,opt,name=project,proto3" json:"project,omitempty"`
	ApiKeyId     string        `protobuf:"bytes,10,opt,name=api_key_id,json=apiKeyId,proto3" json:"api_key_id,omitempty"`
	ApiMethod    string        `protobuf:"bytes,5,opt,name=api_method,json=apiMethod,proto3" json:"api_method,omitempty"`
	StatusCode   int32         `protobuf:"varint,6,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	Timestamp    int64         `protobuf:"varint,7,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	LatencyMs    int32         `protobuf:"varint,8,opt,name=latency_ms,json=latencyMs,proto3" json:"latency_ms,omitempty"`
	Details      *UsageDetails `protobuf:"bytes,9,opt,name=details,proto3" json:"details,omitempty"`
	// contains filtered or unexported fields
}

func (*UsageRecord) Descriptor deprecated

func (*UsageRecord) Descriptor() ([]byte, []int)

Deprecated: Use UsageRecord.ProtoReflect.Descriptor instead.

func (*UsageRecord) GetApiKeyId added in v0.14.0

func (x *UsageRecord) GetApiKeyId() string

func (*UsageRecord) GetApiMethod

func (x *UsageRecord) GetApiMethod() string

func (*UsageRecord) GetDetails added in v0.12.0

func (x *UsageRecord) GetDetails() *UsageDetails

func (*UsageRecord) GetLatencyMs

func (x *UsageRecord) GetLatencyMs() int32

func (*UsageRecord) GetOrganization

func (x *UsageRecord) GetOrganization() string

func (*UsageRecord) GetProject

func (x *UsageRecord) GetProject() string

func (*UsageRecord) GetStatusCode

func (x *UsageRecord) GetStatusCode() int32

func (*UsageRecord) GetTenant

func (x *UsageRecord) GetTenant() string

func (*UsageRecord) GetTimestamp

func (x *UsageRecord) GetTimestamp() int64

func (*UsageRecord) GetUserId added in v0.9.0

func (x *UsageRecord) GetUserId() string

func (*UsageRecord) ProtoMessage

func (*UsageRecord) ProtoMessage()

func (*UsageRecord) ProtoReflect

func (x *UsageRecord) ProtoReflect() protoreflect.Message

func (*UsageRecord) Reset

func (x *UsageRecord) Reset()

func (*UsageRecord) String

func (x *UsageRecord) String() string

Jump to

Keyboard shortcuts

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