corvic-engine 0.3.0rc58__cp38-abi3-win_amd64.whl → 0.3.0rc60__cp38-abi3-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- corvic/engine/_native.pyd +0 -0
- corvic/model/__init__.py +0 -3
- corvic/model/_base_model.py +9 -6
- corvic/model/_completion_model.py +10 -4
- corvic/model/_proto_orm_convert.py +4 -91
- corvic/orm/__init__.py +5 -75
- corvic/orm/base.py +1 -1
- {corvic_engine-0.3.0rc58.dist-info → corvic_engine-0.3.0rc60.dist-info}/METADATA +1 -1
- {corvic_engine-0.3.0rc58.dist-info → corvic_engine-0.3.0rc60.dist-info}/RECORD +23 -42
- corvic_generated/feature/v2/feature_view_pb2.py +39 -47
- corvic_generated/feature/v2/feature_view_pb2.pyi +0 -14
- corvic_generated/feature/v2/space_pb2.py +77 -87
- corvic_generated/ingest/v2/pipeline_pb2.py +33 -27
- corvic_generated/ingest/v2/quick_mode_pb2.py +18 -13
- corvic_generated/ingest/v2/quick_mode_pb2.pyi +1 -0
- corvic_generated/ingest/v2/resource_pb2.py +64 -58
- corvic_generated/ingest/v2/room_pb2.py +32 -32
- corvic_generated/ingest/v2/source_pb2.py +43 -43
- corvic_generated/ingest/v2/table_pb2.py +23 -23
- corvic_generated/model/v1alpha/models_pb2.py +2 -2
- corvic_generated/model/v1alpha/models_pb2.pyi +4 -4
- corvic/model/_agent.py +0 -154
- corvic_generated/chat/__init__.py +0 -0
- corvic_generated/chat/v1/__init__.py +0 -0
- corvic_generated/chat/v1/service_pb2.py +0 -65
- corvic_generated/chat/v1/service_pb2.pyi +0 -132
- corvic_generated/chat/v1/service_pb2_grpc.py +0 -198
- corvic_generated/chat/v1/service_pb2_grpc.pyi +0 -97
- corvic_generated/completion/__init__.py +0 -0
- corvic_generated/completion/v1/__init__.py +0 -0
- corvic_generated/completion/v1/service_pb2.py +0 -69
- corvic_generated/completion/v1/service_pb2.pyi +0 -201
- corvic_generated/completion/v1/service_pb2_grpc.py +0 -198
- corvic_generated/completion/v1/service_pb2_grpc.pyi +0 -97
- corvic_generated/query/__init__.py +0 -0
- corvic_generated/query/v1/__init__.py +0 -0
- corvic_generated/query/v1/query_pb2.py +0 -36
- corvic_generated/query/v1/query_pb2.pyi +0 -63
- corvic_generated/query/v1/query_pb2_grpc.py +0 -66
- corvic_generated/query/v1/query_pb2_grpc.pyi +0 -41
- {corvic_engine-0.3.0rc58.dist-info → corvic_engine-0.3.0rc60.dist-info}/WHEEL +0 -0
- {corvic_engine-0.3.0rc58.dist-info → corvic_engine-0.3.0rc60.dist-info}/licenses/LICENSE +0 -0
@@ -183,7 +183,7 @@ class Agent(_message.Message):
|
|
183
183
|
def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., room_id: _Optional[str] = ..., agent_parameters: _Optional[_Union[_agent_pb2.AgentParameters, _Mapping]] = ..., org_id: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...
|
184
184
|
|
185
185
|
class CompletionModel(_message.Message):
|
186
|
-
__slots__ = ("id", "name", "description", "org_id", "parameters", "secret_api_key", "last_validation_time", "
|
186
|
+
__slots__ = ("id", "name", "description", "org_id", "parameters", "secret_api_key", "last_validation_time", "last_successful_validation", "created_at")
|
187
187
|
ID_FIELD_NUMBER: _ClassVar[int]
|
188
188
|
NAME_FIELD_NUMBER: _ClassVar[int]
|
189
189
|
DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
|
@@ -191,7 +191,7 @@ class CompletionModel(_message.Message):
|
|
191
191
|
PARAMETERS_FIELD_NUMBER: _ClassVar[int]
|
192
192
|
SECRET_API_KEY_FIELD_NUMBER: _ClassVar[int]
|
193
193
|
LAST_VALIDATION_TIME_FIELD_NUMBER: _ClassVar[int]
|
194
|
-
|
194
|
+
LAST_SUCCESSFUL_VALIDATION_FIELD_NUMBER: _ClassVar[int]
|
195
195
|
CREATED_AT_FIELD_NUMBER: _ClassVar[int]
|
196
196
|
id: str
|
197
197
|
name: str
|
@@ -200,6 +200,6 @@ class CompletionModel(_message.Message):
|
|
200
200
|
parameters: _completion_model_pb2.CompletionModelParameters
|
201
201
|
secret_api_key: str
|
202
202
|
last_validation_time: _timestamp_pb2.Timestamp
|
203
|
-
|
203
|
+
last_successful_validation: _timestamp_pb2.Timestamp
|
204
204
|
created_at: _timestamp_pb2.Timestamp
|
205
|
-
def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., org_id: _Optional[str] = ..., parameters: _Optional[_Union[_completion_model_pb2.CompletionModelParameters, _Mapping]] = ..., secret_api_key: _Optional[str] = ..., last_validation_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...,
|
205
|
+
def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., org_id: _Optional[str] = ..., parameters: _Optional[_Union[_completion_model_pb2.CompletionModelParameters, _Mapping]] = ..., secret_api_key: _Optional[str] = ..., last_validation_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., last_successful_validation: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...
|
corvic/model/_agent.py
DELETED
@@ -1,154 +0,0 @@
|
|
1
|
-
"""Corvic Agents."""
|
2
|
-
|
3
|
-
from __future__ import annotations
|
4
|
-
|
5
|
-
import copy
|
6
|
-
import datetime
|
7
|
-
from collections.abc import Iterable, Sequence
|
8
|
-
from typing import TypeAlias
|
9
|
-
|
10
|
-
from sqlalchemy import orm as sa_orm
|
11
|
-
|
12
|
-
from corvic import orm, system
|
13
|
-
from corvic.model._base_model import BelongsToRoomModel
|
14
|
-
from corvic.model._defaults import Defaults
|
15
|
-
from corvic.model._proto_orm_convert import (
|
16
|
-
agent_delete_orms,
|
17
|
-
agent_orm_to_proto,
|
18
|
-
agent_proto_to_orm,
|
19
|
-
)
|
20
|
-
from corvic.result import InvalidArgumentError, NotFoundError, Ok
|
21
|
-
from corvic_generated.model.v1alpha import models_pb2
|
22
|
-
from corvic_generated.orm.v1.agent_pb2 import AgentParameters
|
23
|
-
|
24
|
-
OrgID: TypeAlias = orm.OrgID
|
25
|
-
RoomID: TypeAlias = orm.RoomID
|
26
|
-
FeatureViewID: TypeAlias = orm.FeatureViewID
|
27
|
-
AgentID: TypeAlias = orm.AgentID
|
28
|
-
|
29
|
-
|
30
|
-
class Agent(BelongsToRoomModel[AgentID, models_pb2.Agent, orm.Agent]):
|
31
|
-
"""A corvic agent represents a named agent that can produce embeddings."""
|
32
|
-
|
33
|
-
@classmethod
|
34
|
-
def orm_class(cls):
|
35
|
-
return orm.Agent
|
36
|
-
|
37
|
-
@classmethod
|
38
|
-
def id_class(cls):
|
39
|
-
return AgentID
|
40
|
-
|
41
|
-
@classmethod
|
42
|
-
def orm_to_proto(cls, orm_obj: orm.Agent) -> models_pb2.Agent:
|
43
|
-
return agent_orm_to_proto(orm_obj)
|
44
|
-
|
45
|
-
@classmethod
|
46
|
-
def proto_to_orm(
|
47
|
-
cls, proto_obj: models_pb2.Agent, session: orm.Session
|
48
|
-
) -> Ok[orm.Agent] | InvalidArgumentError:
|
49
|
-
return agent_proto_to_orm(proto_obj, session)
|
50
|
-
|
51
|
-
@classmethod
|
52
|
-
def delete_by_ids(
|
53
|
-
cls, ids: Sequence[AgentID], session: orm.Session
|
54
|
-
) -> Ok[None] | InvalidArgumentError:
|
55
|
-
return agent_delete_orms(ids, session)
|
56
|
-
|
57
|
-
@classmethod
|
58
|
-
def from_id(
|
59
|
-
cls,
|
60
|
-
agent_id: AgentID,
|
61
|
-
client: system.Client | None = None,
|
62
|
-
session: sa_orm.Session | None = None,
|
63
|
-
) -> Ok[Agent] | NotFoundError:
|
64
|
-
client = client or Defaults.get_default_client()
|
65
|
-
return cls.load_proto_for(agent_id, client, existing_session=session).map(
|
66
|
-
lambda proto_self: cls(client, proto_self)
|
67
|
-
)
|
68
|
-
|
69
|
-
@classmethod
|
70
|
-
def from_orm(
|
71
|
-
cls,
|
72
|
-
agent: orm.Agent,
|
73
|
-
client: system.Client | None = None,
|
74
|
-
):
|
75
|
-
client = client or Defaults.get_default_client()
|
76
|
-
return cls(
|
77
|
-
client,
|
78
|
-
cls.orm_to_proto(agent),
|
79
|
-
)
|
80
|
-
|
81
|
-
@classmethod
|
82
|
-
def create(
|
83
|
-
cls,
|
84
|
-
name: str,
|
85
|
-
parameters: AgentParameters,
|
86
|
-
room_id: RoomID | None = None,
|
87
|
-
client: system.Client | None = None,
|
88
|
-
):
|
89
|
-
client = client or Defaults.get_default_client()
|
90
|
-
return cls(
|
91
|
-
client,
|
92
|
-
models_pb2.Agent(
|
93
|
-
name=name,
|
94
|
-
agent_parameters=parameters,
|
95
|
-
room_id=str(room_id or Defaults.get_default_room_id(client)),
|
96
|
-
),
|
97
|
-
)
|
98
|
-
|
99
|
-
@classmethod
|
100
|
-
def from_proto(
|
101
|
-
cls, proto: models_pb2.Agent, client: system.Client | None = None
|
102
|
-
) -> Agent:
|
103
|
-
client = client or Defaults.get_default_client()
|
104
|
-
return cls(client, proto)
|
105
|
-
|
106
|
-
@classmethod
|
107
|
-
def list(
|
108
|
-
cls,
|
109
|
-
*,
|
110
|
-
limit: int | None = None,
|
111
|
-
room_id: RoomID | None = None,
|
112
|
-
created_before: datetime.datetime | None = None,
|
113
|
-
client: system.Client | None = None,
|
114
|
-
ids: Iterable[AgentID] | None = None,
|
115
|
-
existing_session: sa_orm.Session | None = None,
|
116
|
-
) -> Ok[list[Agent]] | NotFoundError | InvalidArgumentError:
|
117
|
-
"""List agent models."""
|
118
|
-
client = client or Defaults.get_default_client()
|
119
|
-
match cls.list_as_proto(
|
120
|
-
client,
|
121
|
-
limit=limit,
|
122
|
-
room_id=room_id,
|
123
|
-
created_before=created_before,
|
124
|
-
ids=ids,
|
125
|
-
existing_session=existing_session,
|
126
|
-
):
|
127
|
-
case NotFoundError() | InvalidArgumentError() as err:
|
128
|
-
return err
|
129
|
-
case Ok(protos):
|
130
|
-
return Ok([cls.from_proto(proto, client) for proto in protos])
|
131
|
-
|
132
|
-
@property
|
133
|
-
def name(self) -> str:
|
134
|
-
return self.proto_self.name
|
135
|
-
|
136
|
-
@property
|
137
|
-
def parameters(self) -> AgentParameters:
|
138
|
-
return self.proto_self.agent_parameters
|
139
|
-
|
140
|
-
def with_name(self, name: str) -> Agent:
|
141
|
-
proto_self = copy.deepcopy(self.proto_self)
|
142
|
-
proto_self.name = name
|
143
|
-
return self.__class__(
|
144
|
-
self.client,
|
145
|
-
proto_self=proto_self,
|
146
|
-
)
|
147
|
-
|
148
|
-
def with_parameters(self, parameters: AgentParameters) -> Agent:
|
149
|
-
proto_self = copy.deepcopy(self.proto_self)
|
150
|
-
proto_self.agent_parameters.CopyFrom(parameters)
|
151
|
-
return self.__class__(
|
152
|
-
self.client,
|
153
|
-
proto_self=proto_self,
|
154
|
-
)
|
File without changes
|
File without changes
|
@@ -1,65 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
-
# source: corvic/chat/v1/service.proto
|
4
|
-
# Protobuf Python Version: 4.25.3
|
5
|
-
"""Generated protocol buffer code."""
|
6
|
-
from google.protobuf import descriptor as _descriptor
|
7
|
-
from google.protobuf import descriptor_pool as _descriptor_pool
|
8
|
-
from google.protobuf import symbol_database as _symbol_database
|
9
|
-
from google.protobuf.internal import builder as _builder
|
10
|
-
# @@protoc_insertion_point(imports)
|
11
|
-
|
12
|
-
_sym_db = _symbol_database.Default()
|
13
|
-
|
14
|
-
|
15
|
-
from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2
|
16
|
-
|
17
|
-
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x63orvic/chat/v1/service.proto\x12\x0e\x63orvic.chat.v1\x1a google/protobuf/descriptor.proto\"!\n\x0bUserMessage\x12\x12\n\x04text\x18\x01 \x01(\tR\x04text\"\xc7\x01\n\x0c\x41gentMessage\x12\x1f\n\x0b\x61gent_model\x18\x01 \x01(\tR\nagentModel\x12\x12\n\x04text\x18\x02 \x01(\tR\x04text\x12L\n\tdocuments\x18\x03 \x03(\x0b\x32..corvic.chat.v1.AgentMessage.DocumentReferenceR\tdocuments\x1a\x34\n\x11\x44ocumentReference\x12\x1f\n\x0b\x64ocument_id\x18\x01 \x01(\x03R\ndocumentId\"\xe8\x01\n\x0cMessageEntry\x12\x0e\n\x02id\x18\x01 \x01(\x03R\x02id\x12\x1b\n\tthread_id\x18\x02 \x01(\x03R\x08threadId\x12\x19\n\x08store_id\x18\x03 \x01(\x03R\x07storeId\x12@\n\x0cuser_message\x18\x04 \x01(\x0b\x32\x1b.corvic.chat.v1.UserMessageH\x00R\x0buserMessage\x12\x43\n\ragent_message\x18\x05 \x01(\x0b\x32\x1c.corvic.chat.v1.AgentMessageH\x00R\x0c\x61gentMessageB\t\n\x07\x63ontent\"8\n\x0bThreadEntry\x12\x0e\n\x02id\x18\x01 \x01(\x03R\x02id\x12\x19\n\x08store_id\x18\x02 \x01(\x03R\x07storeId\"0\n\x13\x43reateThreadRequest\x12\x19\n\x08store_id\x18\x02 \x01(\x03R\x07storeId\"I\n\x14\x43reateThreadResponse\x12\x31\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x1b.corvic.chat.v1.ThreadEntryR\x05\x65ntry\"%\n\x13\x44\x65leteThreadRequest\x12\x0e\n\x02id\x18\x01 \x01(\x03R\x02id\"\x16\n\x14\x44\x65leteThreadResponse\"/\n\x12ListThreadsRequest\x12\x19\n\x08store_id\x18\x01 \x01(\x03R\x07storeId\"H\n\x13ListThreadsResponse\x12\x31\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x1b.corvic.chat.v1.ThreadEntryR\x05\x65ntry\"G\n\x14\x41ppendMessageRequest\x12\x12\n\x04text\x18\x01 \x01(\tR\x04text\x12\x1b\n\tthread_id\x18\x02 \x01(\x03R\x08threadId\"\x17\n\x15\x41ppendMessageResponse\"\x86\x01\n\x11GetMessagesCursor\x12\x1d\n\tthread_id\x18\x01 \x01(\x03H\x00R\x08threadId\x12\x1b\n\x08store_id\x18\x02 \x01(\x03H\x00R\x07storeId\x12*\n\x11last_message_sent\x18\x03 \x01(\x03R\x0flastMessageSentB\t\n\x07\x63ontent\"\x9d\x01\n\x12GetMessagesRequest\x12\x1d\n\tthread_id\x18\x01 \x01(\x03H\x00R\x08threadId\x12\x1b\n\x08store_id\x18\x02 \x01(\x03H\x00R\x07storeId\x12\x18\n\x06\x63ursor\x18\x03 \x01(\tH\x00R\x06\x63ursor\x12&\n\x0fmax_most_recent\x18\x04 \x01(\x04R\rmaxMostRecentB\t\n\x07\x63ontent\"*\n\x10UpToDateSentinel\x12\x16\n\x06\x63ursor\x18\x01 \x01(\tR\x06\x63ursor\"g\n\x13GetMessagesResponse\x12\x16\n\x06\x63ursor\x18\x01 \x01(\tR\x06\x63ursor\x12\x38\n\x08messages\x18\x02 \x03(\x0b\x32\x1c.corvic.chat.v1.MessageEntryR\x08messages2\xe7\x03\n\rThreadService\x12[\n\x0c\x43reateThread\x12#.corvic.chat.v1.CreateThreadRequest\x1a$.corvic.chat.v1.CreateThreadResponse\"\x00\x12[\n\x0c\x44\x65leteThread\x12#.corvic.chat.v1.DeleteThreadRequest\x1a$.corvic.chat.v1.DeleteThreadResponse\"\x00\x12]\n\x0bListThreads\x12\".corvic.chat.v1.ListThreadsRequest\x1a#.corvic.chat.v1.ListThreadsResponse\"\x03\x90\x02\x01\x30\x01\x12^\n\rAppendMessage\x12$.corvic.chat.v1.AppendMessageRequest\x1a%.corvic.chat.v1.AppendMessageResponse\"\x00\x12]\n\x0bGetMessages\x12\".corvic.chat.v1.GetMessagesRequest\x1a#.corvic.chat.v1.GetMessagesResponse\"\x03\x90\x02\x01\x30\x01\x62\x06proto3')
|
19
|
-
|
20
|
-
_globals = globals()
|
21
|
-
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
22
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'corvic.chat.v1.service_pb2', _globals)
|
23
|
-
if _descriptor._USE_C_DESCRIPTORS == False:
|
24
|
-
DESCRIPTOR._options = None
|
25
|
-
_globals['_THREADSERVICE'].methods_by_name['ListThreads']._options = None
|
26
|
-
_globals['_THREADSERVICE'].methods_by_name['ListThreads']._serialized_options = b'\220\002\001'
|
27
|
-
_globals['_THREADSERVICE'].methods_by_name['GetMessages']._options = None
|
28
|
-
_globals['_THREADSERVICE'].methods_by_name['GetMessages']._serialized_options = b'\220\002\001'
|
29
|
-
_globals['_USERMESSAGE']._serialized_start=82
|
30
|
-
_globals['_USERMESSAGE']._serialized_end=115
|
31
|
-
_globals['_AGENTMESSAGE']._serialized_start=118
|
32
|
-
_globals['_AGENTMESSAGE']._serialized_end=317
|
33
|
-
_globals['_AGENTMESSAGE_DOCUMENTREFERENCE']._serialized_start=265
|
34
|
-
_globals['_AGENTMESSAGE_DOCUMENTREFERENCE']._serialized_end=317
|
35
|
-
_globals['_MESSAGEENTRY']._serialized_start=320
|
36
|
-
_globals['_MESSAGEENTRY']._serialized_end=552
|
37
|
-
_globals['_THREADENTRY']._serialized_start=554
|
38
|
-
_globals['_THREADENTRY']._serialized_end=610
|
39
|
-
_globals['_CREATETHREADREQUEST']._serialized_start=612
|
40
|
-
_globals['_CREATETHREADREQUEST']._serialized_end=660
|
41
|
-
_globals['_CREATETHREADRESPONSE']._serialized_start=662
|
42
|
-
_globals['_CREATETHREADRESPONSE']._serialized_end=735
|
43
|
-
_globals['_DELETETHREADREQUEST']._serialized_start=737
|
44
|
-
_globals['_DELETETHREADREQUEST']._serialized_end=774
|
45
|
-
_globals['_DELETETHREADRESPONSE']._serialized_start=776
|
46
|
-
_globals['_DELETETHREADRESPONSE']._serialized_end=798
|
47
|
-
_globals['_LISTTHREADSREQUEST']._serialized_start=800
|
48
|
-
_globals['_LISTTHREADSREQUEST']._serialized_end=847
|
49
|
-
_globals['_LISTTHREADSRESPONSE']._serialized_start=849
|
50
|
-
_globals['_LISTTHREADSRESPONSE']._serialized_end=921
|
51
|
-
_globals['_APPENDMESSAGEREQUEST']._serialized_start=923
|
52
|
-
_globals['_APPENDMESSAGEREQUEST']._serialized_end=994
|
53
|
-
_globals['_APPENDMESSAGERESPONSE']._serialized_start=996
|
54
|
-
_globals['_APPENDMESSAGERESPONSE']._serialized_end=1019
|
55
|
-
_globals['_GETMESSAGESCURSOR']._serialized_start=1022
|
56
|
-
_globals['_GETMESSAGESCURSOR']._serialized_end=1156
|
57
|
-
_globals['_GETMESSAGESREQUEST']._serialized_start=1159
|
58
|
-
_globals['_GETMESSAGESREQUEST']._serialized_end=1316
|
59
|
-
_globals['_UPTODATESENTINEL']._serialized_start=1318
|
60
|
-
_globals['_UPTODATESENTINEL']._serialized_end=1360
|
61
|
-
_globals['_GETMESSAGESRESPONSE']._serialized_start=1362
|
62
|
-
_globals['_GETMESSAGESRESPONSE']._serialized_end=1465
|
63
|
-
_globals['_THREADSERVICE']._serialized_start=1468
|
64
|
-
_globals['_THREADSERVICE']._serialized_end=1955
|
65
|
-
# @@protoc_insertion_point(module_scope)
|
@@ -1,132 +0,0 @@
|
|
1
|
-
from google.protobuf import descriptor_pb2 as _descriptor_pb2
|
2
|
-
from google.protobuf.internal import containers as _containers
|
3
|
-
from google.protobuf import descriptor as _descriptor
|
4
|
-
from google.protobuf import message as _message
|
5
|
-
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
6
|
-
|
7
|
-
DESCRIPTOR: _descriptor.FileDescriptor
|
8
|
-
|
9
|
-
class UserMessage(_message.Message):
|
10
|
-
__slots__ = ("text",)
|
11
|
-
TEXT_FIELD_NUMBER: _ClassVar[int]
|
12
|
-
text: str
|
13
|
-
def __init__(self, text: _Optional[str] = ...) -> None: ...
|
14
|
-
|
15
|
-
class AgentMessage(_message.Message):
|
16
|
-
__slots__ = ("agent_model", "text", "documents")
|
17
|
-
class DocumentReference(_message.Message):
|
18
|
-
__slots__ = ("document_id",)
|
19
|
-
DOCUMENT_ID_FIELD_NUMBER: _ClassVar[int]
|
20
|
-
document_id: int
|
21
|
-
def __init__(self, document_id: _Optional[int] = ...) -> None: ...
|
22
|
-
AGENT_MODEL_FIELD_NUMBER: _ClassVar[int]
|
23
|
-
TEXT_FIELD_NUMBER: _ClassVar[int]
|
24
|
-
DOCUMENTS_FIELD_NUMBER: _ClassVar[int]
|
25
|
-
agent_model: str
|
26
|
-
text: str
|
27
|
-
documents: _containers.RepeatedCompositeFieldContainer[AgentMessage.DocumentReference]
|
28
|
-
def __init__(self, agent_model: _Optional[str] = ..., text: _Optional[str] = ..., documents: _Optional[_Iterable[_Union[AgentMessage.DocumentReference, _Mapping]]] = ...) -> None: ...
|
29
|
-
|
30
|
-
class MessageEntry(_message.Message):
|
31
|
-
__slots__ = ("id", "thread_id", "store_id", "user_message", "agent_message")
|
32
|
-
ID_FIELD_NUMBER: _ClassVar[int]
|
33
|
-
THREAD_ID_FIELD_NUMBER: _ClassVar[int]
|
34
|
-
STORE_ID_FIELD_NUMBER: _ClassVar[int]
|
35
|
-
USER_MESSAGE_FIELD_NUMBER: _ClassVar[int]
|
36
|
-
AGENT_MESSAGE_FIELD_NUMBER: _ClassVar[int]
|
37
|
-
id: int
|
38
|
-
thread_id: int
|
39
|
-
store_id: int
|
40
|
-
user_message: UserMessage
|
41
|
-
agent_message: AgentMessage
|
42
|
-
def __init__(self, id: _Optional[int] = ..., thread_id: _Optional[int] = ..., store_id: _Optional[int] = ..., user_message: _Optional[_Union[UserMessage, _Mapping]] = ..., agent_message: _Optional[_Union[AgentMessage, _Mapping]] = ...) -> None: ...
|
43
|
-
|
44
|
-
class ThreadEntry(_message.Message):
|
45
|
-
__slots__ = ("id", "store_id")
|
46
|
-
ID_FIELD_NUMBER: _ClassVar[int]
|
47
|
-
STORE_ID_FIELD_NUMBER: _ClassVar[int]
|
48
|
-
id: int
|
49
|
-
store_id: int
|
50
|
-
def __init__(self, id: _Optional[int] = ..., store_id: _Optional[int] = ...) -> None: ...
|
51
|
-
|
52
|
-
class CreateThreadRequest(_message.Message):
|
53
|
-
__slots__ = ("store_id",)
|
54
|
-
STORE_ID_FIELD_NUMBER: _ClassVar[int]
|
55
|
-
store_id: int
|
56
|
-
def __init__(self, store_id: _Optional[int] = ...) -> None: ...
|
57
|
-
|
58
|
-
class CreateThreadResponse(_message.Message):
|
59
|
-
__slots__ = ("entry",)
|
60
|
-
ENTRY_FIELD_NUMBER: _ClassVar[int]
|
61
|
-
entry: ThreadEntry
|
62
|
-
def __init__(self, entry: _Optional[_Union[ThreadEntry, _Mapping]] = ...) -> None: ...
|
63
|
-
|
64
|
-
class DeleteThreadRequest(_message.Message):
|
65
|
-
__slots__ = ("id",)
|
66
|
-
ID_FIELD_NUMBER: _ClassVar[int]
|
67
|
-
id: int
|
68
|
-
def __init__(self, id: _Optional[int] = ...) -> None: ...
|
69
|
-
|
70
|
-
class DeleteThreadResponse(_message.Message):
|
71
|
-
__slots__ = ()
|
72
|
-
def __init__(self) -> None: ...
|
73
|
-
|
74
|
-
class ListThreadsRequest(_message.Message):
|
75
|
-
__slots__ = ("store_id",)
|
76
|
-
STORE_ID_FIELD_NUMBER: _ClassVar[int]
|
77
|
-
store_id: int
|
78
|
-
def __init__(self, store_id: _Optional[int] = ...) -> None: ...
|
79
|
-
|
80
|
-
class ListThreadsResponse(_message.Message):
|
81
|
-
__slots__ = ("entry",)
|
82
|
-
ENTRY_FIELD_NUMBER: _ClassVar[int]
|
83
|
-
entry: ThreadEntry
|
84
|
-
def __init__(self, entry: _Optional[_Union[ThreadEntry, _Mapping]] = ...) -> None: ...
|
85
|
-
|
86
|
-
class AppendMessageRequest(_message.Message):
|
87
|
-
__slots__ = ("text", "thread_id")
|
88
|
-
TEXT_FIELD_NUMBER: _ClassVar[int]
|
89
|
-
THREAD_ID_FIELD_NUMBER: _ClassVar[int]
|
90
|
-
text: str
|
91
|
-
thread_id: int
|
92
|
-
def __init__(self, text: _Optional[str] = ..., thread_id: _Optional[int] = ...) -> None: ...
|
93
|
-
|
94
|
-
class AppendMessageResponse(_message.Message):
|
95
|
-
__slots__ = ()
|
96
|
-
def __init__(self) -> None: ...
|
97
|
-
|
98
|
-
class GetMessagesCursor(_message.Message):
|
99
|
-
__slots__ = ("thread_id", "store_id", "last_message_sent")
|
100
|
-
THREAD_ID_FIELD_NUMBER: _ClassVar[int]
|
101
|
-
STORE_ID_FIELD_NUMBER: _ClassVar[int]
|
102
|
-
LAST_MESSAGE_SENT_FIELD_NUMBER: _ClassVar[int]
|
103
|
-
thread_id: int
|
104
|
-
store_id: int
|
105
|
-
last_message_sent: int
|
106
|
-
def __init__(self, thread_id: _Optional[int] = ..., store_id: _Optional[int] = ..., last_message_sent: _Optional[int] = ...) -> None: ...
|
107
|
-
|
108
|
-
class GetMessagesRequest(_message.Message):
|
109
|
-
__slots__ = ("thread_id", "store_id", "cursor", "max_most_recent")
|
110
|
-
THREAD_ID_FIELD_NUMBER: _ClassVar[int]
|
111
|
-
STORE_ID_FIELD_NUMBER: _ClassVar[int]
|
112
|
-
CURSOR_FIELD_NUMBER: _ClassVar[int]
|
113
|
-
MAX_MOST_RECENT_FIELD_NUMBER: _ClassVar[int]
|
114
|
-
thread_id: int
|
115
|
-
store_id: int
|
116
|
-
cursor: str
|
117
|
-
max_most_recent: int
|
118
|
-
def __init__(self, thread_id: _Optional[int] = ..., store_id: _Optional[int] = ..., cursor: _Optional[str] = ..., max_most_recent: _Optional[int] = ...) -> None: ...
|
119
|
-
|
120
|
-
class UpToDateSentinel(_message.Message):
|
121
|
-
__slots__ = ("cursor",)
|
122
|
-
CURSOR_FIELD_NUMBER: _ClassVar[int]
|
123
|
-
cursor: str
|
124
|
-
def __init__(self, cursor: _Optional[str] = ...) -> None: ...
|
125
|
-
|
126
|
-
class GetMessagesResponse(_message.Message):
|
127
|
-
__slots__ = ("cursor", "messages")
|
128
|
-
CURSOR_FIELD_NUMBER: _ClassVar[int]
|
129
|
-
MESSAGES_FIELD_NUMBER: _ClassVar[int]
|
130
|
-
cursor: str
|
131
|
-
messages: _containers.RepeatedCompositeFieldContainer[MessageEntry]
|
132
|
-
def __init__(self, cursor: _Optional[str] = ..., messages: _Optional[_Iterable[_Union[MessageEntry, _Mapping]]] = ...) -> None: ...
|
@@ -1,198 +0,0 @@
|
|
1
|
-
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
2
|
-
"""Client and server classes corresponding to protobuf-defined services."""
|
3
|
-
import grpc
|
4
|
-
|
5
|
-
from corvic_generated.chat.v1 import service_pb2 as corvic_dot_chat_dot_v1_dot_service__pb2
|
6
|
-
|
7
|
-
|
8
|
-
class ThreadServiceStub(object):
|
9
|
-
"""Missing associated documentation comment in .proto file."""
|
10
|
-
|
11
|
-
def __init__(self, channel):
|
12
|
-
"""Constructor.
|
13
|
-
|
14
|
-
Args:
|
15
|
-
channel: A grpc.Channel.
|
16
|
-
"""
|
17
|
-
self.CreateThread = channel.unary_unary(
|
18
|
-
'/corvic.chat.v1.ThreadService/CreateThread',
|
19
|
-
request_serializer=corvic_dot_chat_dot_v1_dot_service__pb2.CreateThreadRequest.SerializeToString,
|
20
|
-
response_deserializer=corvic_dot_chat_dot_v1_dot_service__pb2.CreateThreadResponse.FromString,
|
21
|
-
)
|
22
|
-
self.DeleteThread = channel.unary_unary(
|
23
|
-
'/corvic.chat.v1.ThreadService/DeleteThread',
|
24
|
-
request_serializer=corvic_dot_chat_dot_v1_dot_service__pb2.DeleteThreadRequest.SerializeToString,
|
25
|
-
response_deserializer=corvic_dot_chat_dot_v1_dot_service__pb2.DeleteThreadResponse.FromString,
|
26
|
-
)
|
27
|
-
self.ListThreads = channel.unary_stream(
|
28
|
-
'/corvic.chat.v1.ThreadService/ListThreads',
|
29
|
-
request_serializer=corvic_dot_chat_dot_v1_dot_service__pb2.ListThreadsRequest.SerializeToString,
|
30
|
-
response_deserializer=corvic_dot_chat_dot_v1_dot_service__pb2.ListThreadsResponse.FromString,
|
31
|
-
)
|
32
|
-
self.AppendMessage = channel.unary_unary(
|
33
|
-
'/corvic.chat.v1.ThreadService/AppendMessage',
|
34
|
-
request_serializer=corvic_dot_chat_dot_v1_dot_service__pb2.AppendMessageRequest.SerializeToString,
|
35
|
-
response_deserializer=corvic_dot_chat_dot_v1_dot_service__pb2.AppendMessageResponse.FromString,
|
36
|
-
)
|
37
|
-
self.GetMessages = channel.unary_stream(
|
38
|
-
'/corvic.chat.v1.ThreadService/GetMessages',
|
39
|
-
request_serializer=corvic_dot_chat_dot_v1_dot_service__pb2.GetMessagesRequest.SerializeToString,
|
40
|
-
response_deserializer=corvic_dot_chat_dot_v1_dot_service__pb2.GetMessagesResponse.FromString,
|
41
|
-
)
|
42
|
-
|
43
|
-
|
44
|
-
class ThreadServiceServicer(object):
|
45
|
-
"""Missing associated documentation comment in .proto file."""
|
46
|
-
|
47
|
-
def CreateThread(self, request, context):
|
48
|
-
"""Missing associated documentation comment in .proto file."""
|
49
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
50
|
-
context.set_details('Method not implemented!')
|
51
|
-
raise NotImplementedError('Method not implemented!')
|
52
|
-
|
53
|
-
def DeleteThread(self, request, context):
|
54
|
-
"""Missing associated documentation comment in .proto file."""
|
55
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
56
|
-
context.set_details('Method not implemented!')
|
57
|
-
raise NotImplementedError('Method not implemented!')
|
58
|
-
|
59
|
-
def ListThreads(self, request, context):
|
60
|
-
"""Missing associated documentation comment in .proto file."""
|
61
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
62
|
-
context.set_details('Method not implemented!')
|
63
|
-
raise NotImplementedError('Method not implemented!')
|
64
|
-
|
65
|
-
def AppendMessage(self, request, context):
|
66
|
-
"""Missing associated documentation comment in .proto file."""
|
67
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
68
|
-
context.set_details('Method not implemented!')
|
69
|
-
raise NotImplementedError('Method not implemented!')
|
70
|
-
|
71
|
-
def GetMessages(self, request, context):
|
72
|
-
"""Missing associated documentation comment in .proto file."""
|
73
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
74
|
-
context.set_details('Method not implemented!')
|
75
|
-
raise NotImplementedError('Method not implemented!')
|
76
|
-
|
77
|
-
|
78
|
-
def add_ThreadServiceServicer_to_server(servicer, server):
|
79
|
-
rpc_method_handlers = {
|
80
|
-
'CreateThread': grpc.unary_unary_rpc_method_handler(
|
81
|
-
servicer.CreateThread,
|
82
|
-
request_deserializer=corvic_dot_chat_dot_v1_dot_service__pb2.CreateThreadRequest.FromString,
|
83
|
-
response_serializer=corvic_dot_chat_dot_v1_dot_service__pb2.CreateThreadResponse.SerializeToString,
|
84
|
-
),
|
85
|
-
'DeleteThread': grpc.unary_unary_rpc_method_handler(
|
86
|
-
servicer.DeleteThread,
|
87
|
-
request_deserializer=corvic_dot_chat_dot_v1_dot_service__pb2.DeleteThreadRequest.FromString,
|
88
|
-
response_serializer=corvic_dot_chat_dot_v1_dot_service__pb2.DeleteThreadResponse.SerializeToString,
|
89
|
-
),
|
90
|
-
'ListThreads': grpc.unary_stream_rpc_method_handler(
|
91
|
-
servicer.ListThreads,
|
92
|
-
request_deserializer=corvic_dot_chat_dot_v1_dot_service__pb2.ListThreadsRequest.FromString,
|
93
|
-
response_serializer=corvic_dot_chat_dot_v1_dot_service__pb2.ListThreadsResponse.SerializeToString,
|
94
|
-
),
|
95
|
-
'AppendMessage': grpc.unary_unary_rpc_method_handler(
|
96
|
-
servicer.AppendMessage,
|
97
|
-
request_deserializer=corvic_dot_chat_dot_v1_dot_service__pb2.AppendMessageRequest.FromString,
|
98
|
-
response_serializer=corvic_dot_chat_dot_v1_dot_service__pb2.AppendMessageResponse.SerializeToString,
|
99
|
-
),
|
100
|
-
'GetMessages': grpc.unary_stream_rpc_method_handler(
|
101
|
-
servicer.GetMessages,
|
102
|
-
request_deserializer=corvic_dot_chat_dot_v1_dot_service__pb2.GetMessagesRequest.FromString,
|
103
|
-
response_serializer=corvic_dot_chat_dot_v1_dot_service__pb2.GetMessagesResponse.SerializeToString,
|
104
|
-
),
|
105
|
-
}
|
106
|
-
generic_handler = grpc.method_handlers_generic_handler(
|
107
|
-
'corvic.chat.v1.ThreadService', rpc_method_handlers)
|
108
|
-
server.add_generic_rpc_handlers((generic_handler,))
|
109
|
-
|
110
|
-
|
111
|
-
# This class is part of an EXPERIMENTAL API.
|
112
|
-
class ThreadService(object):
|
113
|
-
"""Missing associated documentation comment in .proto file."""
|
114
|
-
|
115
|
-
@staticmethod
|
116
|
-
def CreateThread(request,
|
117
|
-
target,
|
118
|
-
options=(),
|
119
|
-
channel_credentials=None,
|
120
|
-
call_credentials=None,
|
121
|
-
insecure=False,
|
122
|
-
compression=None,
|
123
|
-
wait_for_ready=None,
|
124
|
-
timeout=None,
|
125
|
-
metadata=None):
|
126
|
-
return grpc.experimental.unary_unary(request, target, '/corvic.chat.v1.ThreadService/CreateThread',
|
127
|
-
corvic_dot_chat_dot_v1_dot_service__pb2.CreateThreadRequest.SerializeToString,
|
128
|
-
corvic_dot_chat_dot_v1_dot_service__pb2.CreateThreadResponse.FromString,
|
129
|
-
options, channel_credentials,
|
130
|
-
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
131
|
-
|
132
|
-
@staticmethod
|
133
|
-
def DeleteThread(request,
|
134
|
-
target,
|
135
|
-
options=(),
|
136
|
-
channel_credentials=None,
|
137
|
-
call_credentials=None,
|
138
|
-
insecure=False,
|
139
|
-
compression=None,
|
140
|
-
wait_for_ready=None,
|
141
|
-
timeout=None,
|
142
|
-
metadata=None):
|
143
|
-
return grpc.experimental.unary_unary(request, target, '/corvic.chat.v1.ThreadService/DeleteThread',
|
144
|
-
corvic_dot_chat_dot_v1_dot_service__pb2.DeleteThreadRequest.SerializeToString,
|
145
|
-
corvic_dot_chat_dot_v1_dot_service__pb2.DeleteThreadResponse.FromString,
|
146
|
-
options, channel_credentials,
|
147
|
-
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
148
|
-
|
149
|
-
@staticmethod
|
150
|
-
def ListThreads(request,
|
151
|
-
target,
|
152
|
-
options=(),
|
153
|
-
channel_credentials=None,
|
154
|
-
call_credentials=None,
|
155
|
-
insecure=False,
|
156
|
-
compression=None,
|
157
|
-
wait_for_ready=None,
|
158
|
-
timeout=None,
|
159
|
-
metadata=None):
|
160
|
-
return grpc.experimental.unary_stream(request, target, '/corvic.chat.v1.ThreadService/ListThreads',
|
161
|
-
corvic_dot_chat_dot_v1_dot_service__pb2.ListThreadsRequest.SerializeToString,
|
162
|
-
corvic_dot_chat_dot_v1_dot_service__pb2.ListThreadsResponse.FromString,
|
163
|
-
options, channel_credentials,
|
164
|
-
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
165
|
-
|
166
|
-
@staticmethod
|
167
|
-
def AppendMessage(request,
|
168
|
-
target,
|
169
|
-
options=(),
|
170
|
-
channel_credentials=None,
|
171
|
-
call_credentials=None,
|
172
|
-
insecure=False,
|
173
|
-
compression=None,
|
174
|
-
wait_for_ready=None,
|
175
|
-
timeout=None,
|
176
|
-
metadata=None):
|
177
|
-
return grpc.experimental.unary_unary(request, target, '/corvic.chat.v1.ThreadService/AppendMessage',
|
178
|
-
corvic_dot_chat_dot_v1_dot_service__pb2.AppendMessageRequest.SerializeToString,
|
179
|
-
corvic_dot_chat_dot_v1_dot_service__pb2.AppendMessageResponse.FromString,
|
180
|
-
options, channel_credentials,
|
181
|
-
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
182
|
-
|
183
|
-
@staticmethod
|
184
|
-
def GetMessages(request,
|
185
|
-
target,
|
186
|
-
options=(),
|
187
|
-
channel_credentials=None,
|
188
|
-
call_credentials=None,
|
189
|
-
insecure=False,
|
190
|
-
compression=None,
|
191
|
-
wait_for_ready=None,
|
192
|
-
timeout=None,
|
193
|
-
metadata=None):
|
194
|
-
return grpc.experimental.unary_stream(request, target, '/corvic.chat.v1.ThreadService/GetMessages',
|
195
|
-
corvic_dot_chat_dot_v1_dot_service__pb2.GetMessagesRequest.SerializeToString,
|
196
|
-
corvic_dot_chat_dot_v1_dot_service__pb2.GetMessagesResponse.FromString,
|
197
|
-
options, channel_credentials,
|
198
|
-
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|