home-services/gen/ai/v1/ai.pb.go
Nik Afiq 520f5d1ffb
Some checks failed
CI / build-ai-gateway (push) Has been cancelled
CI / build-ha-gateway (push) Has been cancelled
CI / build-discord-bot (push) Has been cancelled
CI / test (push) Has been cancelled
feat: add ai-gateway microservice with gRPC API for AI logic
- Implemented new gRPC service `AIService` in `proto/ai/v1/ai.proto` for handling natural language queries.
- Generated Go code for the gRPC service and messages in `gen/ai/v1/`.
- Created `services/ai-gateway/` directory structure with necessary files for the service.
- Added configuration loading and structured logging.
- Implemented domain logic for intent parsing and interaction with Home Assistant.
- Established outbound adapters for Ollama and Home Assistant with mTLS support.
- Updated `go.work` to include the new service and maintain existing dependencies.
- Modified `discord-bot` to use the new `ai-gateway` for AI interactions.
- Added deployment manifest for Kubernetes and CI/CD configuration for building and deploying the service.
2026-04-21 21:52:28 +09:00

201 lines
5.7 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: ai/v1/ai.proto
package aiv1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type QueryRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *QueryRequest) Reset() {
*x = QueryRequest{}
mi := &file_ai_v1_ai_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *QueryRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryRequest) ProtoMessage() {}
func (x *QueryRequest) ProtoReflect() protoreflect.Message {
mi := &file_ai_v1_ai_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.
func (*QueryRequest) Descriptor() ([]byte, []int) {
return file_ai_v1_ai_proto_rawDescGZIP(), []int{0}
}
func (x *QueryRequest) GetText() string {
if x != nil {
return x.Text
}
return ""
}
func (x *QueryRequest) GetSource() string {
if x != nil {
return x.Source
}
return ""
}
type QueryResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Reply string `protobuf:"bytes,1,opt,name=reply,proto3" json:"reply,omitempty"`
Intent string `protobuf:"bytes,2,opt,name=intent,proto3" json:"intent,omitempty"`
ActionTaken bool `protobuf:"varint,3,opt,name=action_taken,json=actionTaken,proto3" json:"action_taken,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *QueryResponse) Reset() {
*x = QueryResponse{}
mi := &file_ai_v1_ai_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *QueryResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryResponse) ProtoMessage() {}
func (x *QueryResponse) ProtoReflect() protoreflect.Message {
mi := &file_ai_v1_ai_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead.
func (*QueryResponse) Descriptor() ([]byte, []int) {
return file_ai_v1_ai_proto_rawDescGZIP(), []int{1}
}
func (x *QueryResponse) GetReply() string {
if x != nil {
return x.Reply
}
return ""
}
func (x *QueryResponse) GetIntent() string {
if x != nil {
return x.Intent
}
return ""
}
func (x *QueryResponse) GetActionTaken() bool {
if x != nil {
return x.ActionTaken
}
return false
}
var File_ai_v1_ai_proto protoreflect.FileDescriptor
const file_ai_v1_ai_proto_rawDesc = "" +
"\n" +
"\x0eai/v1/ai.proto\x12\x05ai.v1\":\n" +
"\fQueryRequest\x12\x12\n" +
"\x04text\x18\x01 \x01(\tR\x04text\x12\x16\n" +
"\x06source\x18\x02 \x01(\tR\x06source\"`\n" +
"\rQueryResponse\x12\x14\n" +
"\x05reply\x18\x01 \x01(\tR\x05reply\x12\x16\n" +
"\x06intent\x18\x02 \x01(\tR\x06intent\x12!\n" +
"\faction_taken\x18\x03 \x01(\bR\vactionTaken2?\n" +
"\tAIService\x122\n" +
"\x05Query\x12\x13.ai.v1.QueryRequest\x1a\x14.ai.v1.QueryResponseB4Z2gitea.nik4nao.com/nik/home-services/gen/ai/v1;aiv1b\x06proto3"
var (
file_ai_v1_ai_proto_rawDescOnce sync.Once
file_ai_v1_ai_proto_rawDescData []byte
)
func file_ai_v1_ai_proto_rawDescGZIP() []byte {
file_ai_v1_ai_proto_rawDescOnce.Do(func() {
file_ai_v1_ai_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ai_v1_ai_proto_rawDesc), len(file_ai_v1_ai_proto_rawDesc)))
})
return file_ai_v1_ai_proto_rawDescData
}
var file_ai_v1_ai_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_ai_v1_ai_proto_goTypes = []any{
(*QueryRequest)(nil), // 0: ai.v1.QueryRequest
(*QueryResponse)(nil), // 1: ai.v1.QueryResponse
}
var file_ai_v1_ai_proto_depIdxs = []int32{
0, // 0: ai.v1.AIService.Query:input_type -> ai.v1.QueryRequest
1, // 1: ai.v1.AIService.Query:output_type -> ai.v1.QueryResponse
1, // [1:2] is the sub-list for method output_type
0, // [0:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_ai_v1_ai_proto_init() }
func file_ai_v1_ai_proto_init() {
if File_ai_v1_ai_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_ai_v1_ai_proto_rawDesc), len(file_ai_v1_ai_proto_rawDesc)),
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_ai_v1_ai_proto_goTypes,
DependencyIndexes: file_ai_v1_ai_proto_depIdxs,
MessageInfos: file_ai_v1_ai_proto_msgTypes,
}.Build()
File_ai_v1_ai_proto = out.File
file_ai_v1_ai_proto_goTypes = nil
file_ai_v1_ai_proto_depIdxs = nil
}