python

package
v0.0.0-...-7354109 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Summarizer_name = map[int32]string{
		0: "LANGCHAIN",
		1: "BERT",
	}
	Summarizer_value = map[string]int32{
		"LANGCHAIN": 0,
		"BERT":      1,
	}
)

Enum value maps for Summarizer.

View Source
var File_python_proto protoreflect.FileDescriptor
View Source
var Python_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "python.Python",
	HandlerType: (*PythonServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Transcribe",
			Handler:    _Python_Transcribe_Handler,
		},
		{
			MethodName: "Summarize",
			Handler:    _Python_Summarize_Handler,
		},
		{
			MethodName: "YoutubeTranscript",
			Handler:    _Python_YoutubeTranscript_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "python.proto",
}

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

Functions

func RegisterPythonServer

func RegisterPythonServer(s grpc.ServiceRegistrar, srv PythonServer)

Types

type PythonClient

type PythonClient interface {
	Transcribe(ctx context.Context, in *TranscribeRequest, opts ...grpc.CallOption) (*TranscribeResponse, error)
	Summarize(ctx context.Context, in *SummarizeRequest, opts ...grpc.CallOption) (*SummarizeResponse, error)
	YoutubeTranscript(ctx context.Context, in *Video, opts ...grpc.CallOption) (*Transcript, error)
}

PythonClient is the client API for Python 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 NewPythonClient

func NewPythonClient(cc grpc.ClientConnInterface) PythonClient

type PythonServer

type PythonServer interface {
	Transcribe(context.Context, *TranscribeRequest) (*TranscribeResponse, error)
	Summarize(context.Context, *SummarizeRequest) (*SummarizeResponse, error)
	YoutubeTranscript(context.Context, *Video) (*Transcript, error)
	// contains filtered or unexported methods
}

PythonServer is the server API for Python service. All implementations must embed UnimplementedPythonServer for forward compatibility

type SummarizeRequest

type SummarizeRequest struct {
	Content    string     `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	Summarizer Summarizer `protobuf:"varint,2,opt,name=summarizer,proto3,enum=python.Summarizer" json:"summarizer,omitempty"`
	// contains filtered or unexported fields
}

func (*SummarizeRequest) Descriptor deprecated

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

Deprecated: Use SummarizeRequest.ProtoReflect.Descriptor instead.

func (*SummarizeRequest) GetContent

func (x *SummarizeRequest) GetContent() string

func (*SummarizeRequest) GetSummarizer

func (x *SummarizeRequest) GetSummarizer() Summarizer

func (*SummarizeRequest) ProtoMessage

func (*SummarizeRequest) ProtoMessage()

func (*SummarizeRequest) ProtoReflect

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

func (*SummarizeRequest) Reset

func (x *SummarizeRequest) Reset()

func (*SummarizeRequest) String

func (x *SummarizeRequest) String() string

type SummarizeResponse

type SummarizeResponse struct {
	Summary string `protobuf:"bytes,1,opt,name=summary,proto3" json:"summary,omitempty"`
	// contains filtered or unexported fields
}

func (*SummarizeResponse) Descriptor deprecated

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

Deprecated: Use SummarizeResponse.ProtoReflect.Descriptor instead.

func (*SummarizeResponse) GetSummary

func (x *SummarizeResponse) GetSummary() string

func (*SummarizeResponse) ProtoMessage

func (*SummarizeResponse) ProtoMessage()

func (*SummarizeResponse) ProtoReflect

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

func (*SummarizeResponse) Reset

func (x *SummarizeResponse) Reset()

func (*SummarizeResponse) String

func (x *SummarizeResponse) String() string

type Summarizer

type Summarizer int32
const (
	Summarizer_LANGCHAIN Summarizer = 0
	Summarizer_BERT      Summarizer = 1
)

func (Summarizer) Descriptor

func (Summarizer) Descriptor() protoreflect.EnumDescriptor

func (Summarizer) Enum

func (x Summarizer) Enum() *Summarizer

func (Summarizer) EnumDescriptor deprecated

func (Summarizer) EnumDescriptor() ([]byte, []int)

Deprecated: Use Summarizer.Descriptor instead.

func (Summarizer) Number

func (x Summarizer) Number() protoreflect.EnumNumber

func (Summarizer) String

func (x Summarizer) String() string

func (Summarizer) Type

type TranscribeRequest

type TranscribeRequest struct {
	File string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
	// contains filtered or unexported fields
}

func (*TranscribeRequest) Descriptor deprecated

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

Deprecated: Use TranscribeRequest.ProtoReflect.Descriptor instead.

func (*TranscribeRequest) GetFile

func (x *TranscribeRequest) GetFile() string

func (*TranscribeRequest) ProtoMessage

func (*TranscribeRequest) ProtoMessage()

func (*TranscribeRequest) ProtoReflect

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

func (*TranscribeRequest) Reset

func (x *TranscribeRequest) Reset()

func (*TranscribeRequest) String

func (x *TranscribeRequest) String() string

type TranscribeResponse

type TranscribeResponse struct {
	Transcription string `protobuf:"bytes,1,opt,name=transcription,proto3" json:"transcription,omitempty"`
	// contains filtered or unexported fields
}

func (*TranscribeResponse) Descriptor deprecated

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

Deprecated: Use TranscribeResponse.ProtoReflect.Descriptor instead.

func (*TranscribeResponse) GetTranscription

func (x *TranscribeResponse) GetTranscription() string

func (*TranscribeResponse) ProtoMessage

func (*TranscribeResponse) ProtoMessage()

func (*TranscribeResponse) ProtoReflect

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

func (*TranscribeResponse) Reset

func (x *TranscribeResponse) Reset()

func (*TranscribeResponse) String

func (x *TranscribeResponse) String() string

type Transcript

type Transcript struct {
	Transcript []*TranscriptSection `protobuf:"bytes,1,rep,name=transcript,proto3" json:"transcript,omitempty"`
	// contains filtered or unexported fields
}

func (*Transcript) Descriptor deprecated

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

Deprecated: Use Transcript.ProtoReflect.Descriptor instead.

func (*Transcript) GetTranscript

func (x *Transcript) GetTranscript() []*TranscriptSection

func (*Transcript) ProtoMessage

func (*Transcript) ProtoMessage()

func (*Transcript) ProtoReflect

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

func (*Transcript) Reset

func (x *Transcript) Reset()

func (*Transcript) String

func (x *Transcript) String() string

type TranscriptSection

type TranscriptSection struct {
	Text     string  `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	Start    float32 `protobuf:"fixed32,2,opt,name=start,proto3" json:"start,omitempty"`
	Duration float32 `protobuf:"fixed32,3,opt,name=duration,proto3" json:"duration,omitempty"`
	// contains filtered or unexported fields
}

func (*TranscriptSection) Descriptor deprecated

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

Deprecated: Use TranscriptSection.ProtoReflect.Descriptor instead.

func (*TranscriptSection) GetDuration

func (x *TranscriptSection) GetDuration() float32

func (*TranscriptSection) GetStart

func (x *TranscriptSection) GetStart() float32

func (*TranscriptSection) GetText

func (x *TranscriptSection) GetText() string

func (*TranscriptSection) ProtoMessage

func (*TranscriptSection) ProtoMessage()

func (*TranscriptSection) ProtoReflect

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

func (*TranscriptSection) Reset

func (x *TranscriptSection) Reset()

func (*TranscriptSection) String

func (x *TranscriptSection) String() string

type UnimplementedPythonServer

type UnimplementedPythonServer struct {
}

UnimplementedPythonServer must be embedded to have forward compatible implementations.

func (UnimplementedPythonServer) Summarize

func (UnimplementedPythonServer) Transcribe

func (UnimplementedPythonServer) YoutubeTranscript

type UnsafePythonServer

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

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

type Video

type Video struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*Video) Descriptor deprecated

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

Deprecated: Use Video.ProtoReflect.Descriptor instead.

func (*Video) GetId

func (x *Video) GetId() string

func (*Video) ProtoMessage

func (*Video) ProtoMessage()

func (*Video) ProtoReflect

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

func (*Video) Reset

func (x *Video) Reset()

func (*Video) String

func (x *Video) String() string

Jump to

Keyboard shortcuts

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