Documentation
¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterAPIUsageServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAPIUsageServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client APIUsageServiceClient) error
- func RegisterAPIUsageServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAPIUsageServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server APIUsageServiceServer) error
- func RegisterAPIUsageServiceServer(s grpc.ServiceRegistrar, srv APIUsageServiceServer)
- func RegisterCollectionInternalServiceServer(s grpc.ServiceRegistrar, srv CollectionInternalServiceServer)
- type APIUsageServiceClient
- type APIUsageServiceServer
- type AggregatedSummary
- func (*AggregatedSummary) Descriptor() ([]byte, []int)deprecated
- func (x *AggregatedSummary) GetMethodSummaries() []*Summary
- func (x *AggregatedSummary) GetSummary() *Summary
- func (*AggregatedSummary) ProtoMessage()
- func (x *AggregatedSummary) ProtoReflect() protoreflect.Message
- func (x *AggregatedSummary) Reset()
- func (x *AggregatedSummary) String() string
- type CollectionInternalServiceClient
- type CollectionInternalServiceServer
- type CreateChatCompletion
- func (*CreateChatCompletion) Descriptor() ([]byte, []int)deprecated
- func (x *CreateChatCompletion) GetCompletionTokens() int32
- func (x *CreateChatCompletion) GetModelId() string
- func (x *CreateChatCompletion) GetPromptTokens() int32
- func (x *CreateChatCompletion) GetTimeToFirstTokenMs() int32
- func (*CreateChatCompletion) ProtoMessage()
- func (x *CreateChatCompletion) ProtoReflect() protoreflect.Message
- func (x *CreateChatCompletion) Reset()
- func (x *CreateChatCompletion) String() string
- type CreateCompletion
- func (*CreateCompletion) Descriptor() ([]byte, []int)deprecated
- func (x *CreateCompletion) GetCompletionTokens() int32
- func (x *CreateCompletion) GetModelId() string
- func (x *CreateCompletion) GetPromptTokens() int32
- func (x *CreateCompletion) GetTimeToFirstTokenMs() int32
- func (*CreateCompletion) ProtoMessage()
- func (x *CreateCompletion) ProtoReflect() protoreflect.Message
- func (x *CreateCompletion) Reset()
- func (x *CreateCompletion) String() string
- type CreateUsageRequest
- func (*CreateUsageRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUsageRequest) GetRecords() []*UsageRecord
- func (*CreateUsageRequest) ProtoMessage()
- func (x *CreateUsageRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUsageRequest) Reset()
- func (x *CreateUsageRequest) String() string
- type GetAggregatedSummaryRequest
- func (*GetAggregatedSummaryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetAggregatedSummaryRequest) GetEndTime() int64
- func (x *GetAggregatedSummaryRequest) GetStartTime() int64
- func (x *GetAggregatedSummaryRequest) GetTenantId() string
- func (*GetAggregatedSummaryRequest) ProtoMessage()
- func (x *GetAggregatedSummaryRequest) ProtoReflect() protoreflect.Message
- func (x *GetAggregatedSummaryRequest) Reset()
- func (x *GetAggregatedSummaryRequest) String() string
- type GetUsageDataRequest
- func (*GetUsageDataRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUsageDataRequest) GetAfter() string
- func (x *GetUsageDataRequest) GetEndTime() int64
- func (x *GetUsageDataRequest) GetFilter() *GetUsageDataRequest_Filter
- func (x *GetUsageDataRequest) GetLimit() int32
- func (x *GetUsageDataRequest) GetStartTime() int64
- func (*GetUsageDataRequest) ProtoMessage()
- func (x *GetUsageDataRequest) ProtoReflect() protoreflect.Message
- func (x *GetUsageDataRequest) Reset()
- func (x *GetUsageDataRequest) String() string
- type GetUsageDataRequest_Filter
- func (*GetUsageDataRequest_Filter) Descriptor() ([]byte, []int)deprecated
- func (x *GetUsageDataRequest_Filter) GetApiKeys() []string
- func (x *GetUsageDataRequest_Filter) GetModels() []string
- func (*GetUsageDataRequest_Filter) ProtoMessage()
- func (x *GetUsageDataRequest_Filter) ProtoReflect() protoreflect.Message
- func (x *GetUsageDataRequest_Filter) Reset()
- func (x *GetUsageDataRequest_Filter) String() string
- type ListUsageDataRequest
- func (*ListUsageDataRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListUsageDataRequest) GetEndTime() int64
- func (x *ListUsageDataRequest) GetStartTime() int64
- func (*ListUsageDataRequest) ProtoMessage()
- func (x *ListUsageDataRequest) ProtoReflect() protoreflect.Message
- func (x *ListUsageDataRequest) Reset()
- func (x *ListUsageDataRequest) String() string
- type ListUsageDataResponse
- func (*ListUsageDataResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListUsageDataResponse) GetUsages() []*UsageDataByGroup
- func (*ListUsageDataResponse) ProtoMessage()
- func (x *ListUsageDataResponse) ProtoReflect() protoreflect.Message
- func (x *ListUsageDataResponse) Reset()
- func (x *ListUsageDataResponse) String() string
- type Summary
- func (*Summary) Descriptor() ([]byte, []int)deprecated
- func (x *Summary) GetAverageLatency() float64
- func (x *Summary) GetFailureRequests() int64
- func (x *Summary) GetMethod() string
- func (x *Summary) GetSuccessRequests() int64
- func (x *Summary) GetTotalRequests() int64
- func (*Summary) ProtoMessage()
- func (x *Summary) ProtoReflect() protoreflect.Message
- func (x *Summary) Reset()
- func (x *Summary) String() string
- type UnimplementedAPIUsageServiceServer
- func (UnimplementedAPIUsageServiceServer) GetAggregatedSummary(context.Context, *GetAggregatedSummaryRequest) (*AggregatedSummary, error)
- func (UnimplementedAPIUsageServiceServer) GetUsageData(context.Context, *GetUsageDataRequest) (*UsageData, error)
- func (UnimplementedAPIUsageServiceServer) ListUsageData(context.Context, *ListUsageDataRequest) (*ListUsageDataResponse, error)
- type UnimplementedCollectionInternalServiceServer
- type UnsafeAPIUsageServiceServer
- type UnsafeCollectionInternalServiceServer
- type Usage
- type UsageData
- type UsageDataByGroup
- func (*UsageDataByGroup) Descriptor() ([]byte, []int)deprecated
- func (x *UsageDataByGroup) GetApiKeyId() string
- func (x *UsageDataByGroup) GetAvgLatencyMs() float64
- func (x *UsageDataByGroup) GetAvgTimeToFirstTokenMs() float64
- func (x *UsageDataByGroup) GetModelId() string
- func (x *UsageDataByGroup) GetTotalCompletionTokens() int64
- func (x *UsageDataByGroup) GetTotalPromptTokens() int64
- func (x *UsageDataByGroup) GetTotalRequests() int64
- func (x *UsageDataByGroup) GetUserId() string
- func (*UsageDataByGroup) ProtoMessage()
- func (x *UsageDataByGroup) ProtoReflect() protoreflect.Message
- func (x *UsageDataByGroup) Reset()
- func (x *UsageDataByGroup) String() string
- type UsageDataPoint
- func (*UsageDataPoint) Descriptor() ([]byte, []int)deprecated
- func (x *UsageDataPoint) GetApiKeyId() string
- func (x *UsageDataPoint) GetApiMethod() string
- func (x *UsageDataPoint) GetCompletionTokens() int32
- func (x *UsageDataPoint) GetLatencyMs() int32
- func (x *UsageDataPoint) GetModelId() string
- func (x *UsageDataPoint) GetOrganization() string
- func (x *UsageDataPoint) GetProject() string
- func (x *UsageDataPoint) GetPromptTokens() int32
- func (x *UsageDataPoint) GetStatusCode() int32
- func (x *UsageDataPoint) GetTimeToFirstTokenMs() int32
- func (x *UsageDataPoint) GetTimestamp() int64
- func (x *UsageDataPoint) GetUserId() string
- func (*UsageDataPoint) ProtoMessage()
- func (x *UsageDataPoint) ProtoReflect() protoreflect.Message
- func (x *UsageDataPoint) Reset()
- func (x *UsageDataPoint) String() string
- type UsageDetails
- func (*UsageDetails) Descriptor() ([]byte, []int)deprecated
- func (x *UsageDetails) GetCreateChatCompletion() *CreateChatCompletion
- func (x *UsageDetails) GetCreateCompletion() *CreateCompletion
- func (m *UsageDetails) GetMessage() isUsageDetails_Message
- func (*UsageDetails) ProtoMessage()
- func (x *UsageDetails) ProtoReflect() protoreflect.Message
- func (x *UsageDetails) Reset()
- func (x *UsageDetails) String() string
- type UsageDetails_CreateChatCompletion
- type UsageDetails_CreateCompletion
- type UsageRecord
- func (*UsageRecord) Descriptor() ([]byte, []int)deprecated
- func (x *UsageRecord) GetApiKeyId() string
- func (x *UsageRecord) GetApiMethod() string
- func (x *UsageRecord) GetDetails() *UsageDetails
- func (x *UsageRecord) GetLatencyMs() int32
- func (x *UsageRecord) GetOrganization() string
- func (x *UsageRecord) GetProject() string
- func (x *UsageRecord) GetStatusCode() int32
- func (x *UsageRecord) GetTenant() string
- func (x *UsageRecord) GetTimestamp() int64
- func (x *UsageRecord) GetUserId() string
- func (*UsageRecord) ProtoMessage()
- func (x *UsageRecord) ProtoReflect() protoreflect.Message
- func (x *UsageRecord) Reset()
- func (x *UsageRecord) String() string
Constants ¶
This section is empty.
Variables ¶
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)
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)
var File_api_v1_collector_server_proto protoreflect.FileDescriptor
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.
func NewCollectionInternalServiceClient ¶
func NewCollectionInternalServiceClient(cc grpc.ClientConnInterface) CollectionInternalServiceClient
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 (x *GetAggregatedSummaryRequest) ProtoReflect() protoreflect.Message
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 (x *GetUsageDataRequest) GetFilter() *GetUsageDataRequest_Filter
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 (x *GetUsageDataRequest_Filter) ProtoReflect() protoreflect.Message
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) GetAverageLatency ¶ added in v0.10.0
func (*Summary) GetFailureRequests ¶ added in v0.10.0
func (*Summary) GetSuccessRequests ¶ added in v0.10.0
func (*Summary) GetTotalRequests ¶ added in v0.10.0
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
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) GetAggregatedSummary(context.Context, *GetAggregatedSummaryRequest) (*AggregatedSummary, error)
func (UnimplementedAPIUsageServiceServer) GetUsageData ¶ added in v1.3.0
func (UnimplementedAPIUsageServiceServer) GetUsageData(context.Context, *GetUsageDataRequest) (*UsageData, error)
func (UnimplementedAPIUsageServiceServer) ListUsageData ¶ added in v1.3.0
func (UnimplementedAPIUsageServiceServer) ListUsageData(context.Context, *ListUsageDataRequest) (*ListUsageDataResponse, error)
type UnimplementedCollectionInternalServiceServer ¶
type UnimplementedCollectionInternalServiceServer struct { }
UnimplementedCollectionInternalServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCollectionInternalServiceServer) CreateUsage ¶
func (UnimplementedCollectionInternalServiceServer) CreateUsage(context.Context, *CreateUsageRequest) (*Usage, error)
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) ProtoMessage ¶
func (*Usage) ProtoMessage()
func (*Usage) ProtoReflect ¶
func (x *Usage) ProtoReflect() protoreflect.Message
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) 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
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