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.
Files changed (42) hide show
  1. corvic/engine/_native.pyd +0 -0
  2. corvic/model/__init__.py +0 -3
  3. corvic/model/_base_model.py +9 -6
  4. corvic/model/_completion_model.py +10 -4
  5. corvic/model/_proto_orm_convert.py +4 -91
  6. corvic/orm/__init__.py +5 -75
  7. corvic/orm/base.py +1 -1
  8. {corvic_engine-0.3.0rc58.dist-info → corvic_engine-0.3.0rc60.dist-info}/METADATA +1 -1
  9. {corvic_engine-0.3.0rc58.dist-info → corvic_engine-0.3.0rc60.dist-info}/RECORD +23 -42
  10. corvic_generated/feature/v2/feature_view_pb2.py +39 -47
  11. corvic_generated/feature/v2/feature_view_pb2.pyi +0 -14
  12. corvic_generated/feature/v2/space_pb2.py +77 -87
  13. corvic_generated/ingest/v2/pipeline_pb2.py +33 -27
  14. corvic_generated/ingest/v2/quick_mode_pb2.py +18 -13
  15. corvic_generated/ingest/v2/quick_mode_pb2.pyi +1 -0
  16. corvic_generated/ingest/v2/resource_pb2.py +64 -58
  17. corvic_generated/ingest/v2/room_pb2.py +32 -32
  18. corvic_generated/ingest/v2/source_pb2.py +43 -43
  19. corvic_generated/ingest/v2/table_pb2.py +23 -23
  20. corvic_generated/model/v1alpha/models_pb2.py +2 -2
  21. corvic_generated/model/v1alpha/models_pb2.pyi +4 -4
  22. corvic/model/_agent.py +0 -154
  23. corvic_generated/chat/__init__.py +0 -0
  24. corvic_generated/chat/v1/__init__.py +0 -0
  25. corvic_generated/chat/v1/service_pb2.py +0 -65
  26. corvic_generated/chat/v1/service_pb2.pyi +0 -132
  27. corvic_generated/chat/v1/service_pb2_grpc.py +0 -198
  28. corvic_generated/chat/v1/service_pb2_grpc.pyi +0 -97
  29. corvic_generated/completion/__init__.py +0 -0
  30. corvic_generated/completion/v1/__init__.py +0 -0
  31. corvic_generated/completion/v1/service_pb2.py +0 -69
  32. corvic_generated/completion/v1/service_pb2.pyi +0 -201
  33. corvic_generated/completion/v1/service_pb2_grpc.py +0 -198
  34. corvic_generated/completion/v1/service_pb2_grpc.pyi +0 -97
  35. corvic_generated/query/__init__.py +0 -0
  36. corvic_generated/query/v1/__init__.py +0 -0
  37. corvic_generated/query/v1/query_pb2.py +0 -36
  38. corvic_generated/query/v1/query_pb2.pyi +0 -63
  39. corvic_generated/query/v1/query_pb2_grpc.py +0 -66
  40. corvic_generated/query/v1/query_pb2_grpc.pyi +0 -41
  41. {corvic_engine-0.3.0rc58.dist-info → corvic_engine-0.3.0rc60.dist-info}/WHEEL +0 -0
  42. {corvic_engine-0.3.0rc58.dist-info → corvic_engine-0.3.0rc60.dist-info}/licenses/LICENSE +0 -0
@@ -1,97 +0,0 @@
1
- """
2
- @generated by mypy-protobuf. Do not edit manually!
3
- isort:skip_file
4
- """
5
- import abc
6
- import collections.abc
7
- import corvic_generated.chat.v1.service_pb2
8
- import grpc
9
- import grpc.aio
10
- import typing
11
-
12
- _T = typing.TypeVar('_T')
13
-
14
- class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta):
15
- ...
16
-
17
- class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore
18
- ...
19
-
20
- class ThreadServiceStub:
21
- def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
22
- CreateThread: grpc.UnaryUnaryMultiCallable[
23
- corvic_generated.chat.v1.service_pb2.CreateThreadRequest,
24
- corvic_generated.chat.v1.service_pb2.CreateThreadResponse,
25
- ]
26
- DeleteThread: grpc.UnaryUnaryMultiCallable[
27
- corvic_generated.chat.v1.service_pb2.DeleteThreadRequest,
28
- corvic_generated.chat.v1.service_pb2.DeleteThreadResponse,
29
- ]
30
- ListThreads: grpc.UnaryStreamMultiCallable[
31
- corvic_generated.chat.v1.service_pb2.ListThreadsRequest,
32
- corvic_generated.chat.v1.service_pb2.ListThreadsResponse,
33
- ]
34
- AppendMessage: grpc.UnaryUnaryMultiCallable[
35
- corvic_generated.chat.v1.service_pb2.AppendMessageRequest,
36
- corvic_generated.chat.v1.service_pb2.AppendMessageResponse,
37
- ]
38
- GetMessages: grpc.UnaryStreamMultiCallable[
39
- corvic_generated.chat.v1.service_pb2.GetMessagesRequest,
40
- corvic_generated.chat.v1.service_pb2.GetMessagesResponse,
41
- ]
42
-
43
- class ThreadServiceAsyncStub:
44
- CreateThread: grpc.aio.UnaryUnaryMultiCallable[
45
- corvic_generated.chat.v1.service_pb2.CreateThreadRequest,
46
- corvic_generated.chat.v1.service_pb2.CreateThreadResponse,
47
- ]
48
- DeleteThread: grpc.aio.UnaryUnaryMultiCallable[
49
- corvic_generated.chat.v1.service_pb2.DeleteThreadRequest,
50
- corvic_generated.chat.v1.service_pb2.DeleteThreadResponse,
51
- ]
52
- ListThreads: grpc.aio.UnaryStreamMultiCallable[
53
- corvic_generated.chat.v1.service_pb2.ListThreadsRequest,
54
- corvic_generated.chat.v1.service_pb2.ListThreadsResponse,
55
- ]
56
- AppendMessage: grpc.aio.UnaryUnaryMultiCallable[
57
- corvic_generated.chat.v1.service_pb2.AppendMessageRequest,
58
- corvic_generated.chat.v1.service_pb2.AppendMessageResponse,
59
- ]
60
- GetMessages: grpc.aio.UnaryStreamMultiCallable[
61
- corvic_generated.chat.v1.service_pb2.GetMessagesRequest,
62
- corvic_generated.chat.v1.service_pb2.GetMessagesResponse,
63
- ]
64
-
65
- class ThreadServiceServicer(metaclass=abc.ABCMeta):
66
- @abc.abstractmethod
67
- def CreateThread(
68
- self,
69
- request: corvic_generated.chat.v1.service_pb2.CreateThreadRequest,
70
- context: _ServicerContext,
71
- ) -> typing.Union[corvic_generated.chat.v1.service_pb2.CreateThreadResponse, collections.abc.Awaitable[corvic_generated.chat.v1.service_pb2.CreateThreadResponse]]: ...
72
- @abc.abstractmethod
73
- def DeleteThread(
74
- self,
75
- request: corvic_generated.chat.v1.service_pb2.DeleteThreadRequest,
76
- context: _ServicerContext,
77
- ) -> typing.Union[corvic_generated.chat.v1.service_pb2.DeleteThreadResponse, collections.abc.Awaitable[corvic_generated.chat.v1.service_pb2.DeleteThreadResponse]]: ...
78
- @abc.abstractmethod
79
- def ListThreads(
80
- self,
81
- request: corvic_generated.chat.v1.service_pb2.ListThreadsRequest,
82
- context: _ServicerContext,
83
- ) -> typing.Union[collections.abc.Iterator[corvic_generated.chat.v1.service_pb2.ListThreadsResponse], collections.abc.AsyncIterator[corvic_generated.chat.v1.service_pb2.ListThreadsResponse]]: ...
84
- @abc.abstractmethod
85
- def AppendMessage(
86
- self,
87
- request: corvic_generated.chat.v1.service_pb2.AppendMessageRequest,
88
- context: _ServicerContext,
89
- ) -> typing.Union[corvic_generated.chat.v1.service_pb2.AppendMessageResponse, collections.abc.Awaitable[corvic_generated.chat.v1.service_pb2.AppendMessageResponse]]: ...
90
- @abc.abstractmethod
91
- def GetMessages(
92
- self,
93
- request: corvic_generated.chat.v1.service_pb2.GetMessagesRequest,
94
- context: _ServicerContext,
95
- ) -> typing.Union[collections.abc.Iterator[corvic_generated.chat.v1.service_pb2.GetMessagesResponse], collections.abc.AsyncIterator[corvic_generated.chat.v1.service_pb2.GetMessagesResponse]]: ...
96
-
97
- def add_ThreadServiceServicer_to_server(servicer: ThreadServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...
File without changes
File without changes
@@ -1,69 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # source: corvic/completion/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\"corvic/completion/v1/service.proto\x12\x14\x63orvic.completion.v1\x1a google/protobuf/descriptor.proto\"\xf6\x03\n\x10\x43ompleteResponse\x12\x12\n\x04text\x18\x01 \x01(\tR\x04text\x12#\n\rfinish_reason\x18\x02 \x01(\tR\x0c\x66inishReason\x12\x18\n\x07\x63reated\x18\x03 \x01(\x03R\x07\x63reated\x12\x42\n\x05usage\x18\x04 \x01(\x0b\x32,.corvic.completion.v1.CompleteResponse.UsageR\x05usage\x12\x44\n\x06\x63hunks\x18\x05 \x03(\x0b\x32,.corvic.completion.v1.CompleteResponse.ChunkR\x06\x63hunks\x1a\xa3\x01\n\x05Usage\x12#\n\rprompt_tokens\x18\x01 \x01(\x05R\x0cpromptTokens\x12+\n\x11\x63ompletion_tokens\x18\x02 \x01(\x05R\x10\x63ompletionTokens\x12!\n\x0ctotal_tokens\x18\x03 \x01(\x05R\x0btotalTokens\x12%\n\x0e\x63ontext_tokens\x18\x04 \x01(\x05R\rcontextTokens\x1a_\n\x05\x43hunk\x12\x19\n\x08\x63hunk_id\x18\x01 \x01(\tR\x07\x63hunkId\x12\x1f\n\x0b\x64ocument_id\x18\x02 \x01(\tR\ndocumentId\x12\x1a\n\x08\x64istance\x18\x03 \x01(\x02R\x08\x64istance\"\xff\x03\n\x13\x43ompleteRagResponse\x12\x12\n\x04text\x18\x01 \x01(\tR\x04text\x12#\n\rfinish_reason\x18\x02 \x01(\tR\x0c\x66inishReason\x12\x18\n\x07\x63reated\x18\x03 \x01(\x03R\x07\x63reated\x12\x45\n\x05usage\x18\x04 \x01(\x0b\x32/.corvic.completion.v1.CompleteRagResponse.UsageR\x05usage\x12G\n\x06\x63hunks\x18\x05 \x03(\x0b\x32/.corvic.completion.v1.CompleteRagResponse.ChunkR\x06\x63hunks\x1a\xa3\x01\n\x05Usage\x12#\n\rprompt_tokens\x18\x01 \x01(\x05R\x0cpromptTokens\x12+\n\x11\x63ompletion_tokens\x18\x02 \x01(\x05R\x10\x63ompletionTokens\x12!\n\x0ctotal_tokens\x18\x03 \x01(\x05R\x0btotalTokens\x12%\n\x0e\x63ontext_tokens\x18\x04 \x01(\x05R\rcontextTokens\x1a_\n\x05\x43hunk\x12\x19\n\x08\x63hunk_id\x18\x01 \x01(\tR\x07\x63hunkId\x12\x1f\n\x0b\x64ocument_id\x18\x02 \x01(\tR\ndocumentId\x12\x1a\n\x08\x64istance\x18\x03 \x01(\x02R\x08\x64istance\"\xbb\x03\n\x12GetDefaultResponse\x12\x1d\n\nsys_prompt\x18\x01 \x01(\tR\tsysPrompt\x12\x1d\n\nmax_chunks\x18\x02 \x01(\x05R\tmaxChunks\x12>\n\nchain_type\x18\x03 \x01(\x0e\x32\x1f.corvic.completion.v1.ChainTypeR\tchainType\x12\x43\n\x0c\x65mbed_engine\x18\x04 \x01(\x0e\x32 .corvic.completion.v1.EngineTypeR\x0b\x65mbedEngine\x12(\n\x10\x65mbed_model_name\x18\x05 \x01(\tR\x0e\x65mbedModelName\x12\x1c\n\tworkspace\x18\x06 \x01(\tR\tworkspace\x12\x1e\n\ncollection\x18\x07 \x01(\tR\ncollection\x12\x10\n\x03tag\x18\x08 \x01(\tR\x03tag\x12\x1c\n\tthreshold\x18\t \x01(\x02R\tthreshold\x12J\n\x0eretriever_type\x18\n \x01(\x0e\x32#.corvic.completion.v1.RetrieverTypeR\rretrieverType\"\x82\x04\n\x12\x43ompleteRagRequest\x12\x14\n\x05model\x18\x01 \x01(\tR\x05model\x12\x16\n\x06prompt\x18\x02 \x01(\tR\x06prompt\x12\x17\n\x07room_id\x18\x03 \x01(\x03R\x06roomId\x12\x1d\n\nsys_prompt\x18\x04 \x01(\tR\tsysPrompt\x12\x1d\n\nmax_chunks\x18\x05 \x01(\x05R\tmaxChunks\x12>\n\nchain_type\x18\x06 \x01(\x0e\x32\x1f.corvic.completion.v1.ChainTypeR\tchainType\x12\x43\n\x0c\x65mbed_engine\x18\x07 \x01(\x0e\x32 .corvic.completion.v1.EngineTypeR\x0b\x65mbedEngine\x12(\n\x10\x65mbed_model_name\x18\x08 \x01(\tR\x0e\x65mbedModelName\x12\x1c\n\tworkspace\x18\t \x01(\tR\tworkspace\x12\x1e\n\ncollection\x18\n \x01(\tR\ncollection\x12\x10\n\x03tag\x18\x0b \x01(\tR\x03tag\x12\x1c\n\tthreshold\x18\x0c \x01(\x02R\tthreshold\x12J\n\x0eretriever_type\x18\r \x01(\x0e\x32#.corvic.completion.v1.RetrieverTypeR\rretrieverType\"^\n\x0f\x43ompleteRequest\x12\x14\n\x05model\x18\x01 \x01(\tR\x05model\x12\x16\n\x06prompt\x18\x02 \x01(\tR\x06prompt\x12\x1d\n\nsys_prompt\x18\x03 \x01(\tR\tsysPrompt\"\"\n\x0eGetShaResponse\x12\x10\n\x03sha\x18\x01 \x01(\tR\x03sha\"\x0f\n\rGetShaRequest\"\x12\n\x10GetModelsRequest\"\x13\n\x11GetDefaultRequest\"\x1b\n\x05Model\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"F\n\x11GetModelsResponse\x12\x31\n\x05names\x18\x01 \x03(\x0b\x32\x1b.corvic.completion.v1.ModelR\x05names*u\n\rRetrieverType\x12\x1e\n\x1aRETRIEVER_TYPE_UNSPECIFIED\x10\x00\x12$\n RETRIEVER_TYPE_SIMILARITY_SEARCH\x10\x01\x12\x1e\n\x1aRETRIEVER_TYPE_FAKE_SEARCH\x10\x02*\xb0\x01\n\nEngineType\x12\x1b\n\x17\x45NGINE_TYPE_UNSPECIFIED\x10\x00\x12\"\n\x1e\x45NGINE_TYPE_HUGGINGFACE_REMOTE\x10\x01\x12!\n\x1d\x45NGINE_TYPE_HUGGINGFACE_LOCAL\x10\x02\x12%\n!ENGINE_TYPE_HUGGINGFACE_INFERENCE\x10\x03\x12\x17\n\x13\x45NGINE_TYPE_OPEN_AI\x10\x04*T\n\tChainType\x12\x1a\n\x16\x43HAIN_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x43HAIN_TYPE_STUFF\x10\x01\x12\x15\n\x11\x43HAIN_TYPE_REFINE\x10\x02\x32\xf9\x03\n\x11\x43ompletionService\x12[\n\x08\x43omplete\x12%.corvic.completion.v1.CompleteRequest\x1a&.corvic.completion.v1.CompleteResponse\"\x00\x12\x64\n\x0b\x43ompleteRag\x12(.corvic.completion.v1.CompleteRagRequest\x1a).corvic.completion.v1.CompleteRagResponse\"\x00\x12X\n\x06GetSha\x12#.corvic.completion.v1.GetShaRequest\x1a$.corvic.completion.v1.GetShaResponse\"\x03\x90\x02\x01\x12\x61\n\tGetModels\x12&.corvic.completion.v1.GetModelsRequest\x1a\'.corvic.completion.v1.GetModelsResponse\"\x03\x90\x02\x01\x12\x64\n\nGetDefault\x12\'.corvic.completion.v1.GetDefaultRequest\x1a(.corvic.completion.v1.GetDefaultResponse\"\x03\x90\x02\x01\x62\x06proto3')
19
-
20
- _globals = globals()
21
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
22
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'corvic.completion.v1.service_pb2', _globals)
23
- if _descriptor._USE_C_DESCRIPTORS == False:
24
- DESCRIPTOR._options = None
25
- _globals['_COMPLETIONSERVICE'].methods_by_name['GetSha']._options = None
26
- _globals['_COMPLETIONSERVICE'].methods_by_name['GetSha']._serialized_options = b'\220\002\001'
27
- _globals['_COMPLETIONSERVICE'].methods_by_name['GetModels']._options = None
28
- _globals['_COMPLETIONSERVICE'].methods_by_name['GetModels']._serialized_options = b'\220\002\001'
29
- _globals['_COMPLETIONSERVICE'].methods_by_name['GetDefault']._options = None
30
- _globals['_COMPLETIONSERVICE'].methods_by_name['GetDefault']._serialized_options = b'\220\002\001'
31
- _globals['_RETRIEVERTYPE']._serialized_start=2367
32
- _globals['_RETRIEVERTYPE']._serialized_end=2484
33
- _globals['_ENGINETYPE']._serialized_start=2487
34
- _globals['_ENGINETYPE']._serialized_end=2663
35
- _globals['_CHAINTYPE']._serialized_start=2665
36
- _globals['_CHAINTYPE']._serialized_end=2749
37
- _globals['_COMPLETERESPONSE']._serialized_start=95
38
- _globals['_COMPLETERESPONSE']._serialized_end=597
39
- _globals['_COMPLETERESPONSE_USAGE']._serialized_start=337
40
- _globals['_COMPLETERESPONSE_USAGE']._serialized_end=500
41
- _globals['_COMPLETERESPONSE_CHUNK']._serialized_start=502
42
- _globals['_COMPLETERESPONSE_CHUNK']._serialized_end=597
43
- _globals['_COMPLETERAGRESPONSE']._serialized_start=600
44
- _globals['_COMPLETERAGRESPONSE']._serialized_end=1111
45
- _globals['_COMPLETERAGRESPONSE_USAGE']._serialized_start=337
46
- _globals['_COMPLETERAGRESPONSE_USAGE']._serialized_end=500
47
- _globals['_COMPLETERAGRESPONSE_CHUNK']._serialized_start=502
48
- _globals['_COMPLETERAGRESPONSE_CHUNK']._serialized_end=597
49
- _globals['_GETDEFAULTRESPONSE']._serialized_start=1114
50
- _globals['_GETDEFAULTRESPONSE']._serialized_end=1557
51
- _globals['_COMPLETERAGREQUEST']._serialized_start=1560
52
- _globals['_COMPLETERAGREQUEST']._serialized_end=2074
53
- _globals['_COMPLETEREQUEST']._serialized_start=2076
54
- _globals['_COMPLETEREQUEST']._serialized_end=2170
55
- _globals['_GETSHARESPONSE']._serialized_start=2172
56
- _globals['_GETSHARESPONSE']._serialized_end=2206
57
- _globals['_GETSHAREQUEST']._serialized_start=2208
58
- _globals['_GETSHAREQUEST']._serialized_end=2223
59
- _globals['_GETMODELSREQUEST']._serialized_start=2225
60
- _globals['_GETMODELSREQUEST']._serialized_end=2243
61
- _globals['_GETDEFAULTREQUEST']._serialized_start=2245
62
- _globals['_GETDEFAULTREQUEST']._serialized_end=2264
63
- _globals['_MODEL']._serialized_start=2266
64
- _globals['_MODEL']._serialized_end=2293
65
- _globals['_GETMODELSRESPONSE']._serialized_start=2295
66
- _globals['_GETMODELSRESPONSE']._serialized_end=2365
67
- _globals['_COMPLETIONSERVICE']._serialized_start=2752
68
- _globals['_COMPLETIONSERVICE']._serialized_end=3257
69
- # @@protoc_insertion_point(module_scope)
@@ -1,201 +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.internal import enum_type_wrapper as _enum_type_wrapper
4
- from google.protobuf import descriptor as _descriptor
5
- from google.protobuf import message as _message
6
- from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
7
-
8
- DESCRIPTOR: _descriptor.FileDescriptor
9
-
10
- class RetrieverType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
11
- __slots__ = ()
12
- RETRIEVER_TYPE_UNSPECIFIED: _ClassVar[RetrieverType]
13
- RETRIEVER_TYPE_SIMILARITY_SEARCH: _ClassVar[RetrieverType]
14
- RETRIEVER_TYPE_FAKE_SEARCH: _ClassVar[RetrieverType]
15
-
16
- class EngineType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
17
- __slots__ = ()
18
- ENGINE_TYPE_UNSPECIFIED: _ClassVar[EngineType]
19
- ENGINE_TYPE_HUGGINGFACE_REMOTE: _ClassVar[EngineType]
20
- ENGINE_TYPE_HUGGINGFACE_LOCAL: _ClassVar[EngineType]
21
- ENGINE_TYPE_HUGGINGFACE_INFERENCE: _ClassVar[EngineType]
22
- ENGINE_TYPE_OPEN_AI: _ClassVar[EngineType]
23
-
24
- class ChainType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
25
- __slots__ = ()
26
- CHAIN_TYPE_UNSPECIFIED: _ClassVar[ChainType]
27
- CHAIN_TYPE_STUFF: _ClassVar[ChainType]
28
- CHAIN_TYPE_REFINE: _ClassVar[ChainType]
29
- RETRIEVER_TYPE_UNSPECIFIED: RetrieverType
30
- RETRIEVER_TYPE_SIMILARITY_SEARCH: RetrieverType
31
- RETRIEVER_TYPE_FAKE_SEARCH: RetrieverType
32
- ENGINE_TYPE_UNSPECIFIED: EngineType
33
- ENGINE_TYPE_HUGGINGFACE_REMOTE: EngineType
34
- ENGINE_TYPE_HUGGINGFACE_LOCAL: EngineType
35
- ENGINE_TYPE_HUGGINGFACE_INFERENCE: EngineType
36
- ENGINE_TYPE_OPEN_AI: EngineType
37
- CHAIN_TYPE_UNSPECIFIED: ChainType
38
- CHAIN_TYPE_STUFF: ChainType
39
- CHAIN_TYPE_REFINE: ChainType
40
-
41
- class CompleteResponse(_message.Message):
42
- __slots__ = ("text", "finish_reason", "created", "usage", "chunks")
43
- class Usage(_message.Message):
44
- __slots__ = ("prompt_tokens", "completion_tokens", "total_tokens", "context_tokens")
45
- PROMPT_TOKENS_FIELD_NUMBER: _ClassVar[int]
46
- COMPLETION_TOKENS_FIELD_NUMBER: _ClassVar[int]
47
- TOTAL_TOKENS_FIELD_NUMBER: _ClassVar[int]
48
- CONTEXT_TOKENS_FIELD_NUMBER: _ClassVar[int]
49
- prompt_tokens: int
50
- completion_tokens: int
51
- total_tokens: int
52
- context_tokens: int
53
- def __init__(self, prompt_tokens: _Optional[int] = ..., completion_tokens: _Optional[int] = ..., total_tokens: _Optional[int] = ..., context_tokens: _Optional[int] = ...) -> None: ...
54
- class Chunk(_message.Message):
55
- __slots__ = ("chunk_id", "document_id", "distance")
56
- CHUNK_ID_FIELD_NUMBER: _ClassVar[int]
57
- DOCUMENT_ID_FIELD_NUMBER: _ClassVar[int]
58
- DISTANCE_FIELD_NUMBER: _ClassVar[int]
59
- chunk_id: str
60
- document_id: str
61
- distance: float
62
- def __init__(self, chunk_id: _Optional[str] = ..., document_id: _Optional[str] = ..., distance: _Optional[float] = ...) -> None: ...
63
- TEXT_FIELD_NUMBER: _ClassVar[int]
64
- FINISH_REASON_FIELD_NUMBER: _ClassVar[int]
65
- CREATED_FIELD_NUMBER: _ClassVar[int]
66
- USAGE_FIELD_NUMBER: _ClassVar[int]
67
- CHUNKS_FIELD_NUMBER: _ClassVar[int]
68
- text: str
69
- finish_reason: str
70
- created: int
71
- usage: CompleteResponse.Usage
72
- chunks: _containers.RepeatedCompositeFieldContainer[CompleteResponse.Chunk]
73
- def __init__(self, text: _Optional[str] = ..., finish_reason: _Optional[str] = ..., created: _Optional[int] = ..., usage: _Optional[_Union[CompleteResponse.Usage, _Mapping]] = ..., chunks: _Optional[_Iterable[_Union[CompleteResponse.Chunk, _Mapping]]] = ...) -> None: ...
74
-
75
- class CompleteRagResponse(_message.Message):
76
- __slots__ = ("text", "finish_reason", "created", "usage", "chunks")
77
- class Usage(_message.Message):
78
- __slots__ = ("prompt_tokens", "completion_tokens", "total_tokens", "context_tokens")
79
- PROMPT_TOKENS_FIELD_NUMBER: _ClassVar[int]
80
- COMPLETION_TOKENS_FIELD_NUMBER: _ClassVar[int]
81
- TOTAL_TOKENS_FIELD_NUMBER: _ClassVar[int]
82
- CONTEXT_TOKENS_FIELD_NUMBER: _ClassVar[int]
83
- prompt_tokens: int
84
- completion_tokens: int
85
- total_tokens: int
86
- context_tokens: int
87
- def __init__(self, prompt_tokens: _Optional[int] = ..., completion_tokens: _Optional[int] = ..., total_tokens: _Optional[int] = ..., context_tokens: _Optional[int] = ...) -> None: ...
88
- class Chunk(_message.Message):
89
- __slots__ = ("chunk_id", "document_id", "distance")
90
- CHUNK_ID_FIELD_NUMBER: _ClassVar[int]
91
- DOCUMENT_ID_FIELD_NUMBER: _ClassVar[int]
92
- DISTANCE_FIELD_NUMBER: _ClassVar[int]
93
- chunk_id: str
94
- document_id: str
95
- distance: float
96
- def __init__(self, chunk_id: _Optional[str] = ..., document_id: _Optional[str] = ..., distance: _Optional[float] = ...) -> None: ...
97
- TEXT_FIELD_NUMBER: _ClassVar[int]
98
- FINISH_REASON_FIELD_NUMBER: _ClassVar[int]
99
- CREATED_FIELD_NUMBER: _ClassVar[int]
100
- USAGE_FIELD_NUMBER: _ClassVar[int]
101
- CHUNKS_FIELD_NUMBER: _ClassVar[int]
102
- text: str
103
- finish_reason: str
104
- created: int
105
- usage: CompleteRagResponse.Usage
106
- chunks: _containers.RepeatedCompositeFieldContainer[CompleteRagResponse.Chunk]
107
- def __init__(self, text: _Optional[str] = ..., finish_reason: _Optional[str] = ..., created: _Optional[int] = ..., usage: _Optional[_Union[CompleteRagResponse.Usage, _Mapping]] = ..., chunks: _Optional[_Iterable[_Union[CompleteRagResponse.Chunk, _Mapping]]] = ...) -> None: ...
108
-
109
- class GetDefaultResponse(_message.Message):
110
- __slots__ = ("sys_prompt", "max_chunks", "chain_type", "embed_engine", "embed_model_name", "workspace", "collection", "tag", "threshold", "retriever_type")
111
- SYS_PROMPT_FIELD_NUMBER: _ClassVar[int]
112
- MAX_CHUNKS_FIELD_NUMBER: _ClassVar[int]
113
- CHAIN_TYPE_FIELD_NUMBER: _ClassVar[int]
114
- EMBED_ENGINE_FIELD_NUMBER: _ClassVar[int]
115
- EMBED_MODEL_NAME_FIELD_NUMBER: _ClassVar[int]
116
- WORKSPACE_FIELD_NUMBER: _ClassVar[int]
117
- COLLECTION_FIELD_NUMBER: _ClassVar[int]
118
- TAG_FIELD_NUMBER: _ClassVar[int]
119
- THRESHOLD_FIELD_NUMBER: _ClassVar[int]
120
- RETRIEVER_TYPE_FIELD_NUMBER: _ClassVar[int]
121
- sys_prompt: str
122
- max_chunks: int
123
- chain_type: ChainType
124
- embed_engine: EngineType
125
- embed_model_name: str
126
- workspace: str
127
- collection: str
128
- tag: str
129
- threshold: float
130
- retriever_type: RetrieverType
131
- def __init__(self, sys_prompt: _Optional[str] = ..., max_chunks: _Optional[int] = ..., chain_type: _Optional[_Union[ChainType, str]] = ..., embed_engine: _Optional[_Union[EngineType, str]] = ..., embed_model_name: _Optional[str] = ..., workspace: _Optional[str] = ..., collection: _Optional[str] = ..., tag: _Optional[str] = ..., threshold: _Optional[float] = ..., retriever_type: _Optional[_Union[RetrieverType, str]] = ...) -> None: ...
132
-
133
- class CompleteRagRequest(_message.Message):
134
- __slots__ = ("model", "prompt", "room_id", "sys_prompt", "max_chunks", "chain_type", "embed_engine", "embed_model_name", "workspace", "collection", "tag", "threshold", "retriever_type")
135
- MODEL_FIELD_NUMBER: _ClassVar[int]
136
- PROMPT_FIELD_NUMBER: _ClassVar[int]
137
- ROOM_ID_FIELD_NUMBER: _ClassVar[int]
138
- SYS_PROMPT_FIELD_NUMBER: _ClassVar[int]
139
- MAX_CHUNKS_FIELD_NUMBER: _ClassVar[int]
140
- CHAIN_TYPE_FIELD_NUMBER: _ClassVar[int]
141
- EMBED_ENGINE_FIELD_NUMBER: _ClassVar[int]
142
- EMBED_MODEL_NAME_FIELD_NUMBER: _ClassVar[int]
143
- WORKSPACE_FIELD_NUMBER: _ClassVar[int]
144
- COLLECTION_FIELD_NUMBER: _ClassVar[int]
145
- TAG_FIELD_NUMBER: _ClassVar[int]
146
- THRESHOLD_FIELD_NUMBER: _ClassVar[int]
147
- RETRIEVER_TYPE_FIELD_NUMBER: _ClassVar[int]
148
- model: str
149
- prompt: str
150
- room_id: int
151
- sys_prompt: str
152
- max_chunks: int
153
- chain_type: ChainType
154
- embed_engine: EngineType
155
- embed_model_name: str
156
- workspace: str
157
- collection: str
158
- tag: str
159
- threshold: float
160
- retriever_type: RetrieverType
161
- def __init__(self, model: _Optional[str] = ..., prompt: _Optional[str] = ..., room_id: _Optional[int] = ..., sys_prompt: _Optional[str] = ..., max_chunks: _Optional[int] = ..., chain_type: _Optional[_Union[ChainType, str]] = ..., embed_engine: _Optional[_Union[EngineType, str]] = ..., embed_model_name: _Optional[str] = ..., workspace: _Optional[str] = ..., collection: _Optional[str] = ..., tag: _Optional[str] = ..., threshold: _Optional[float] = ..., retriever_type: _Optional[_Union[RetrieverType, str]] = ...) -> None: ...
162
-
163
- class CompleteRequest(_message.Message):
164
- __slots__ = ("model", "prompt", "sys_prompt")
165
- MODEL_FIELD_NUMBER: _ClassVar[int]
166
- PROMPT_FIELD_NUMBER: _ClassVar[int]
167
- SYS_PROMPT_FIELD_NUMBER: _ClassVar[int]
168
- model: str
169
- prompt: str
170
- sys_prompt: str
171
- def __init__(self, model: _Optional[str] = ..., prompt: _Optional[str] = ..., sys_prompt: _Optional[str] = ...) -> None: ...
172
-
173
- class GetShaResponse(_message.Message):
174
- __slots__ = ("sha",)
175
- SHA_FIELD_NUMBER: _ClassVar[int]
176
- sha: str
177
- def __init__(self, sha: _Optional[str] = ...) -> None: ...
178
-
179
- class GetShaRequest(_message.Message):
180
- __slots__ = ()
181
- def __init__(self) -> None: ...
182
-
183
- class GetModelsRequest(_message.Message):
184
- __slots__ = ()
185
- def __init__(self) -> None: ...
186
-
187
- class GetDefaultRequest(_message.Message):
188
- __slots__ = ()
189
- def __init__(self) -> None: ...
190
-
191
- class Model(_message.Message):
192
- __slots__ = ("name",)
193
- NAME_FIELD_NUMBER: _ClassVar[int]
194
- name: str
195
- def __init__(self, name: _Optional[str] = ...) -> None: ...
196
-
197
- class GetModelsResponse(_message.Message):
198
- __slots__ = ("names",)
199
- NAMES_FIELD_NUMBER: _ClassVar[int]
200
- names: _containers.RepeatedCompositeFieldContainer[Model]
201
- def __init__(self, names: _Optional[_Iterable[_Union[Model, _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.completion.v1 import service_pb2 as corvic_dot_completion_dot_v1_dot_service__pb2
6
-
7
-
8
- class CompletionServiceStub(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.Complete = channel.unary_unary(
18
- '/corvic.completion.v1.CompletionService/Complete',
19
- request_serializer=corvic_dot_completion_dot_v1_dot_service__pb2.CompleteRequest.SerializeToString,
20
- response_deserializer=corvic_dot_completion_dot_v1_dot_service__pb2.CompleteResponse.FromString,
21
- )
22
- self.CompleteRag = channel.unary_unary(
23
- '/corvic.completion.v1.CompletionService/CompleteRag',
24
- request_serializer=corvic_dot_completion_dot_v1_dot_service__pb2.CompleteRagRequest.SerializeToString,
25
- response_deserializer=corvic_dot_completion_dot_v1_dot_service__pb2.CompleteRagResponse.FromString,
26
- )
27
- self.GetSha = channel.unary_unary(
28
- '/corvic.completion.v1.CompletionService/GetSha',
29
- request_serializer=corvic_dot_completion_dot_v1_dot_service__pb2.GetShaRequest.SerializeToString,
30
- response_deserializer=corvic_dot_completion_dot_v1_dot_service__pb2.GetShaResponse.FromString,
31
- )
32
- self.GetModels = channel.unary_unary(
33
- '/corvic.completion.v1.CompletionService/GetModels',
34
- request_serializer=corvic_dot_completion_dot_v1_dot_service__pb2.GetModelsRequest.SerializeToString,
35
- response_deserializer=corvic_dot_completion_dot_v1_dot_service__pb2.GetModelsResponse.FromString,
36
- )
37
- self.GetDefault = channel.unary_unary(
38
- '/corvic.completion.v1.CompletionService/GetDefault',
39
- request_serializer=corvic_dot_completion_dot_v1_dot_service__pb2.GetDefaultRequest.SerializeToString,
40
- response_deserializer=corvic_dot_completion_dot_v1_dot_service__pb2.GetDefaultResponse.FromString,
41
- )
42
-
43
-
44
- class CompletionServiceServicer(object):
45
- """Missing associated documentation comment in .proto file."""
46
-
47
- def Complete(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 CompleteRag(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 GetSha(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 GetModels(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 GetDefault(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_CompletionServiceServicer_to_server(servicer, server):
79
- rpc_method_handlers = {
80
- 'Complete': grpc.unary_unary_rpc_method_handler(
81
- servicer.Complete,
82
- request_deserializer=corvic_dot_completion_dot_v1_dot_service__pb2.CompleteRequest.FromString,
83
- response_serializer=corvic_dot_completion_dot_v1_dot_service__pb2.CompleteResponse.SerializeToString,
84
- ),
85
- 'CompleteRag': grpc.unary_unary_rpc_method_handler(
86
- servicer.CompleteRag,
87
- request_deserializer=corvic_dot_completion_dot_v1_dot_service__pb2.CompleteRagRequest.FromString,
88
- response_serializer=corvic_dot_completion_dot_v1_dot_service__pb2.CompleteRagResponse.SerializeToString,
89
- ),
90
- 'GetSha': grpc.unary_unary_rpc_method_handler(
91
- servicer.GetSha,
92
- request_deserializer=corvic_dot_completion_dot_v1_dot_service__pb2.GetShaRequest.FromString,
93
- response_serializer=corvic_dot_completion_dot_v1_dot_service__pb2.GetShaResponse.SerializeToString,
94
- ),
95
- 'GetModels': grpc.unary_unary_rpc_method_handler(
96
- servicer.GetModels,
97
- request_deserializer=corvic_dot_completion_dot_v1_dot_service__pb2.GetModelsRequest.FromString,
98
- response_serializer=corvic_dot_completion_dot_v1_dot_service__pb2.GetModelsResponse.SerializeToString,
99
- ),
100
- 'GetDefault': grpc.unary_unary_rpc_method_handler(
101
- servicer.GetDefault,
102
- request_deserializer=corvic_dot_completion_dot_v1_dot_service__pb2.GetDefaultRequest.FromString,
103
- response_serializer=corvic_dot_completion_dot_v1_dot_service__pb2.GetDefaultResponse.SerializeToString,
104
- ),
105
- }
106
- generic_handler = grpc.method_handlers_generic_handler(
107
- 'corvic.completion.v1.CompletionService', rpc_method_handlers)
108
- server.add_generic_rpc_handlers((generic_handler,))
109
-
110
-
111
- # This class is part of an EXPERIMENTAL API.
112
- class CompletionService(object):
113
- """Missing associated documentation comment in .proto file."""
114
-
115
- @staticmethod
116
- def Complete(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.completion.v1.CompletionService/Complete',
127
- corvic_dot_completion_dot_v1_dot_service__pb2.CompleteRequest.SerializeToString,
128
- corvic_dot_completion_dot_v1_dot_service__pb2.CompleteResponse.FromString,
129
- options, channel_credentials,
130
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
131
-
132
- @staticmethod
133
- def CompleteRag(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.completion.v1.CompletionService/CompleteRag',
144
- corvic_dot_completion_dot_v1_dot_service__pb2.CompleteRagRequest.SerializeToString,
145
- corvic_dot_completion_dot_v1_dot_service__pb2.CompleteRagResponse.FromString,
146
- options, channel_credentials,
147
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
148
-
149
- @staticmethod
150
- def GetSha(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_unary(request, target, '/corvic.completion.v1.CompletionService/GetSha',
161
- corvic_dot_completion_dot_v1_dot_service__pb2.GetShaRequest.SerializeToString,
162
- corvic_dot_completion_dot_v1_dot_service__pb2.GetShaResponse.FromString,
163
- options, channel_credentials,
164
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
165
-
166
- @staticmethod
167
- def GetModels(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.completion.v1.CompletionService/GetModels',
178
- corvic_dot_completion_dot_v1_dot_service__pb2.GetModelsRequest.SerializeToString,
179
- corvic_dot_completion_dot_v1_dot_service__pb2.GetModelsResponse.FromString,
180
- options, channel_credentials,
181
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
182
-
183
- @staticmethod
184
- def GetDefault(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_unary(request, target, '/corvic.completion.v1.CompletionService/GetDefault',
195
- corvic_dot_completion_dot_v1_dot_service__pb2.GetDefaultRequest.SerializeToString,
196
- corvic_dot_completion_dot_v1_dot_service__pb2.GetDefaultResponse.FromString,
197
- options, channel_credentials,
198
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)