mppi-protocol 0.1.0__py3-none-any.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.
- mppi/__init__.py +1 -0
- mppi/py.typed +0 -0
- mppi/v1/__init__.py +1 -0
- mppi/v1/mppi_pb2.py +104 -0
- mppi/v1/mppi_pb2.pyi +515 -0
- mppi/v1/mppi_pb2_grpc.py +185 -0
- mppi_protocol/__init__.py +45 -0
- mppi_protocol/_observers.py +121 -0
- mppi_protocol/accounting.py +95 -0
- mppi_protocol/amounts.py +124 -0
- mppi_protocol/capabilities.py +79 -0
- mppi_protocol/catalog.py +206 -0
- mppi_protocol/chain.py +789 -0
- mppi_protocol/circle.py +416 -0
- mppi_protocol/contract.py +363 -0
- mppi_protocol/contract_abi.json +1167 -0
- mppi_protocol/deployment.py +83 -0
- mppi_protocol/discovery.py +233 -0
- mppi_protocol/errors.py +20 -0
- mppi_protocol/follower.py +265 -0
- mppi_protocol/http.py +104 -0
- mppi_protocol/operations.py +145 -0
- mppi_protocol/py.typed +0 -0
- mppi_protocol/registry.py +685 -0
- mppi_protocol/signing.py +318 -0
- mppi_protocol/types.py +297 -0
- mppi_protocol/wire.py +472 -0
- mppi_protocol-0.1.0.dist-info/METADATA +35 -0
- mppi_protocol-0.1.0.dist-info/RECORD +31 -0
- mppi_protocol-0.1.0.dist-info/WHEEL +4 -0
- mppi_protocol-0.1.0.dist-info/licenses/LICENSE +202 -0
mppi/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Generated MPPI protobuf namespace supplied by mppi-protocol."""
|
mppi/py.typed
ADDED
|
File without changes
|
mppi/v1/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Version 1 generated protobuf and native gRPC bindings."""
|
mppi/v1/mppi_pb2.py
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: mppi/v1/mppi.proto
|
|
5
|
+
# Protobuf Python Version: 7.35.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
7,
|
|
15
|
+
35,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'mppi/v1/mppi.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12mppi/v1/mppi.proto\x12\x07mppi.v1\"\xd1\x02\n\x0f\x43ompleteRequest\x12\x12\n\x05model\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06stream\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x17\n\nsession_id\x18\x03 \x01(\x0cH\x02\x88\x01\x01\x12\x13\n\x06run_id\x18\x04 \x01(\x0cH\x03\x88\x01\x01\x12\x1f\n\x12\x63ontrol_generation\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x1b\n\x0erate_card_hash\x18\x06 \x01(\x0cH\x05\x88\x01\x01\x12\x1b\n\x0e\x61uth_signature\x18\x07 \x01(\x0cH\x06\x88\x01\x01\x12\x14\n\x07payload\x18\x08 \x01(\x0cH\x07\x88\x01\x01\x42\x08\n\x06_modelB\t\n\x07_streamB\r\n\x0b_session_idB\t\n\x07_run_idB\x15\n\x13_control_generationB\x11\n\x0f_rate_card_hashB\x11\n\x0f_auth_signatureB\n\n\x08_payload\"\x7f\n\tChatChunk\x12\x11\n\x07payload\x18\x01 \x01(\x0cH\x00\x12%\n\x08terminal\x18\x02 \x01(\x0b\x32\x11.mppi.v1.TerminalH\x00\x12\x30\n\x0eupstream_error\x18\x03 \x01(\x0b\x32\x16.mppi.v1.UpstreamErrorH\x00\x42\x06\n\x04kind\"\xeb\x03\n\x08Terminal\x12\x19\n\x0cinput_tokens\x18\x01 \x01(\x04H\x00\x88\x01\x01\x12\x19\n\x0c\x63\x61\x63he_tokens\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x1a\n\routput_tokens\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x13\n\x06\x61mount\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x17\n\nsession_id\x18\x05 \x01(\x0cH\x04\x88\x01\x01\x12\x13\n\x06run_id\x18\x06 \x01(\x0cH\x05\x88\x01\x01\x12\x12\n\x05model\x18\x07 \x01(\tH\x06\x88\x01\x01\x12\x1b\n\x0erate_card_hash\x18\x08 \x01(\x0cH\x07\x88\x01\x01\x12\'\n\x06status\x18\t \x01(\x0e\x32\x12.mppi.v1.RunStatusH\x08\x88\x01\x01\x12\x1c\n\x0f\x66inal_meter_seq\x18\n \x01(\x04H\t\x88\x01\x01\x12=\n\x14settlement_reference\x18\x0b \x01(\x0b\x32\x1f.mppi.v1.ConfirmedSettlementRefB\x0f\n\r_input_tokensB\x0f\n\r_cache_tokensB\x10\n\x0e_output_tokensB\t\n\x07_amountB\r\n\x0b_session_idB\t\n\x07_run_idB\x08\n\x06_modelB\x11\n\x0f_rate_card_hashB\t\n\x07_statusB\x12\n\x10_final_meter_seq\"\x8e\x05\n\x0e\x43ontrolMessage\x12\x36\n\x11\x63hallenge_request\x18\x01 \x01(\x0b\x32\x19.mppi.v1.ChallengeRequestH\x00\x12\'\n\tchallenge\x18\x02 \x01(\x0b\x32\x12.mppi.v1.ChallengeH\x00\x12,\n\x0csession_open\x18\x03 \x01(\x0b\x32\x14.mppi.v1.SessionOpenH\x00\x12:\n\x13reconnect_challenge\x18\x04 \x01(\x0b\x32\x1b.mppi.v1.ReconnectChallengeH\x00\x12\x36\n\x11reconnect_request\x18\x05 \x01(\x0b\x32\x19.mppi.v1.ReconnectRequestH\x00\x12.\n\rsession_state\x18\x06 \x01(\x0b\x32\x15.mppi.v1.SessionStateH\x00\x12#\n\x07voucher\x18\x07 \x01(\x0b\x32\x10.mppi.v1.VoucherH\x00\x12\x1f\n\x05meter\x18\x08 \x01(\x0b\x32\x0e.mppi.v1.MeterH\x00\x12-\n\rtop_up_notice\x18\t \x01(\x0b\x32\x14.mppi.v1.TopUpNoticeH\x00\x12(\n\nlow_credit\x18\n \x01(\x0b\x32\x12.mppi.v1.LowCreditH\x00\x12\x1f\n\x05\x64rain\x18\x0b \x01(\x0b\x32\x0e.mppi.v1.DrainH\x00\x12#\n\x07receipt\x18\x0c \x01(\x0b\x32\x10.mppi.v1.ReceiptH\x00\x12.\n\rclose_request\x18\r \x01(\x0b\x32\x15.mppi.v1.CloseRequestH\x00\x12,\n\x0c\x63lose_result\x18\x0e \x01(\x0b\x32\x14.mppi.v1.CloseResultH\x00\x42\x06\n\x04kind\"X\n\x10\x43hallengeRequest\x12\x17\n\nrequest_id\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x12\n\x05model\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x08\n\x06_model\"\x91\x03\n\tChallenge\x12\x17\n\nrequest_id\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x12\n\x05model\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0erate_card_hash\x18\x03 \x01(\x0cH\x02\x88\x01\x01\x12\x18\n\x0bprovider_id\x18\x04 \x01(\x0cH\x03\x88\x01\x01\x12\x15\n\x08\x63ontract\x18\x05 \x01(\x0cH\x04\x88\x01\x01\x12\x15\n\x08\x63hain_id\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12\x15\n\x08operator\x18\x07 \x01(\x0cH\x06\x88\x01\x01\x12 \n\x13\x63over_output_tokens\x18\x08 \x01(\x04H\x07\x88\x01\x01\x12#\n\x16suggest_session_tokens\x18\t \x01(\x04H\x08\x88\x01\x01\x42\r\n\x0b_request_idB\x08\n\x06_modelB\x11\n\x0f_rate_card_hashB\x0e\n\x0c_provider_idB\x0b\n\t_contractB\x0b\n\t_chain_idB\x0b\n\t_operatorB\x16\n\x14_cover_output_tokensB\x19\n\x17_suggest_session_tokens\"{\n\x0bSessionOpen\x12\x17\n\nsession_id\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x14\n\x07open_tx\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x12\x15\n\x08\x61gent_id\x18\x03 \x01(\x0cH\x02\x88\x01\x01\x42\r\n\x0b_session_idB\n\n\x08_open_txB\x0b\n\t_agent_id\"2\n\x12ReconnectChallenge\x12\x12\n\x05nonce\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x42\x08\n\x06_nonce\"\xf1\x01\n\x10ReconnectRequest\x12\x17\n\nsession_id\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x12\n\x05nonce\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x12\x16\n\tsignature\x18\x03 \x01(\x0cH\x02\x88\x01\x01\x12(\n\x0elatest_voucher\x18\x04 \x01(\x0b\x32\x10.mppi.v1.Voucher\x12\x1b\n\x0elast_meter_seq\x18\x05 \x01(\x04H\x03\x88\x01\x01\x12\x17\n\x0fpending_run_ids\x18\x06 \x03(\x0c\x42\r\n\x0b_session_idB\x08\n\x06_nonceB\x0c\n\n_signatureB\x11\n\x0f_last_meter_seq\"\xd8\x06\n\x0cSessionState\x12\x17\n\nsession_id\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x12\n\x05nonce\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x12\x1f\n\x12\x63ontrol_generation\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x12\n\x05ready\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x1a\n\rclose_pending\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12.\n\ndescriptor\x18\x06 \x01(\x0b\x32\x1a.mppi.v1.SessionDescriptor\x12*\n\x10\x61\x63\x63\x65pted_voucher\x18\x07 \x01(\x0b\x32\x10.mppi.v1.Voucher\x12\x16\n\tmeter_seq\x18\x08 \x01(\x04H\x05\x88\x01\x01\x12,\n\x0eusage_by_price\x18\t \x03(\x0b\x32\x14.mppi.v1.PricedUsage\x12%\n\nrun_states\x18\n \x03(\x0b\x32\x11.mppi.v1.RunState\x12)\n\x08\x63\x61talogs\x18\x0b \x03(\x0b\x32\x17.mppi.v1.CatalogVersion\x12#\n\x16initial_rate_card_hash\x18\x0c \x01(\x0cH\x06\x88\x01\x01\x12#\n\x16\x63urrent_rate_card_hash\x18\r \x01(\x0cH\x07\x88\x01\x01\x12\x14\n\x07\x64\x65posit\x18\x0e \x01(\x04H\x08\x88\x01\x01\x12\x1f\n\x12settled_cumulative\x18\x0f \x01(\x04H\t\x88\x01\x01\x12+\n\x06status\x18\x10 \x01(\x0e\x32\x16.mppi.v1.SessionStatusH\n\x88\x01\x01\x12\x1f\n\x12\x63hain_block_number\x18\x11 \x01(\x04H\x0b\x88\x01\x01\x12\x1d\n\x10\x63hain_block_hash\x18\x12 \x01(\x0cH\x0c\x88\x01\x01\x42\r\n\x0b_session_idB\x08\n\x06_nonceB\x15\n\x13_control_generationB\x08\n\x06_readyB\x10\n\x0e_close_pendingB\x0c\n\n_meter_seqB\x19\n\x17_initial_rate_card_hashB\x19\n\x17_current_rate_card_hashB\n\n\x08_depositB\x15\n\x13_settled_cumulativeB\t\n\x07_statusB\x15\n\x13_chain_block_numberB\x13\n\x11_chain_block_hash\"\x8f\x02\n\x11SessionDescriptor\x12\x12\n\x05\x61gent\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x1b\n\x0esession_signer\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x12\x18\n\x0bprovider_id\x18\x03 \x01(\x0cH\x02\x88\x01\x01\x12\x16\n\trecipient\x18\x04 \x01(\x0cH\x03\x88\x01\x01\x12\x15\n\x08operator\x18\x05 \x01(\x0cH\x04\x88\x01\x01\x12\x12\n\x05token\x18\x06 \x01(\x0cH\x05\x88\x01\x01\x12\x11\n\x04salt\x18\x07 \x01(\x0cH\x06\x88\x01\x01\x42\x08\n\x06_agentB\x11\n\x0f_session_signerB\x0e\n\x0c_provider_idB\x0c\n\n_recipientB\x0b\n\t_operatorB\x08\n\x06_tokenB\x07\n\x05_salt\"\x7f\n\x07Voucher\x12\x17\n\nsession_id\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x17\n\ncumulative\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x16\n\tsignature\x18\x03 \x01(\x0cH\x02\x88\x01\x01\x42\r\n\x0b_session_idB\r\n\x0b_cumulativeB\x0c\n\n_signature\"\xef\x01\n\x05Meter\x12\x17\n\nsession_id\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x13\n\x06run_id\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x12\x10\n\x03seq\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x19\n\x0cinput_tokens\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x19\n\x0c\x63\x61\x63he_tokens\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x1a\n\routput_tokens\x18\x06 \x01(\x04H\x05\x88\x01\x01\x42\r\n\x0b_session_idB\t\n\x07_run_idB\x06\n\x04_seqB\x0f\n\r_input_tokensB\x0f\n\r_cache_tokensB\x10\n\x0e_output_tokens\"\xbb\x01\n\x0bTopUpNotice\x12\x17\n\nsession_id\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x0f\n\x02tx\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x12\x12\n\x05model\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x0erate_card_hash\x18\x04 \x01(\x0cH\x03\x88\x01\x01\x12\x13\n\x06tokens\x18\x05 \x01(\x04H\x04\x88\x01\x01\x42\r\n\x0b_session_idB\x05\n\x03_txB\x08\n\x06_modelB\x11\n\x0f_rate_card_hashB\t\n\x07_tokens\"\xa7\x02\n\tLowCredit\x12\x17\n\nsession_id\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x12\n\x05model\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0erate_card_hash\x18\x03 \x01(\x0cH\x02\x88\x01\x01\x12\x1d\n\x10remaining_tokens\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\"\n\x15suggest_top_up_tokens\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x32\n\x10\x63overage_request\x18\x06 \x01(\x0b\x32\x18.mppi.v1.CoverageRequestB\r\n\x0b_session_idB\x08\n\x06_modelB\x11\n\x0f_rate_card_hashB\x13\n\x11_remaining_tokensB\x18\n\x16_suggest_top_up_tokens\"\x9d\x01\n\x0f\x43overageRequest\x12\x13\n\x06run_id\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x1f\n\x12\x63ontrol_generation\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x32\n\x11required_by_price\x18\x03 \x03(\x0b\x32\x17.mppi.v1.RequiredTokensB\t\n\x07_run_idB\x15\n\x13_control_generation\"\xe4\x01\n\x0eRequiredTokens\x12\x12\n\x05model\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0erate_card_hash\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x12\x19\n\x0cinput_tokens\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x19\n\x0c\x63\x61\x63he_tokens\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x1a\n\routput_tokens\x18\x05 \x01(\x04H\x04\x88\x01\x01\x42\x08\n\x06_modelB\x11\n\x0f_rate_card_hashB\x0f\n\r_input_tokensB\x0f\n\r_cache_tokensB\x10\n\x0e_output_tokens\"\x85\x01\n\x05\x44rain\x12\x17\n\nsession_id\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x13\n\x06run_id\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x12)\n\x06reason\x18\x03 \x01(\x0e\x32\x14.mppi.v1.DrainReasonH\x02\x88\x01\x01\x42\r\n\x0b_session_idB\t\n\x07_run_idB\t\n\x07_reason\"\xd8\x04\n\x07Receipt\x12\x17\n\nsession_id\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x13\n\x06run_id\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x12\x12\n\x05model\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x0erate_card_hash\x18\x04 \x01(\x0cH\x03\x88\x01\x01\x12\x19\n\x0cinput_tokens\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x1a\n\routput_tokens\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12\x13\n\x06\x61mount\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12\x1f\n\x12settled_cumulative\x18\x08 \x01(\x04H\x07\x88\x01\x01\x12\x19\n\x0c\x63\x61\x63he_tokens\x18\t \x01(\x04H\x08\x88\x01\x01\x12\'\n\x06status\x18\n \x01(\x0e\x32\x12.mppi.v1.RunStatusH\t\x88\x01\x01\x12\x1c\n\x0f\x66inal_meter_seq\x18\x0b \x01(\x04H\n\x88\x01\x01\x12\x34\n\x11\x63hain_observation\x18\x0c \x01(\x0b\x32\x19.mppi.v1.ChainObservation\x12=\n\x14settlement_reference\x18\r \x01(\x0b\x32\x1f.mppi.v1.ConfirmedSettlementRefB\r\n\x0b_session_idB\t\n\x07_run_idB\x08\n\x06_modelB\x11\n\x0f_rate_card_hashB\x0f\n\r_input_tokensB\x10\n\x0e_output_tokensB\t\n\x07_amountB\x15\n\x13_settled_cumulativeB\x0f\n\r_cache_tokensB\t\n\x07_statusB\x12\n\x10_final_meter_seq\"\\\n\x0c\x43loseRequest\x12\x17\n\nsession_id\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x16\n\tsignature\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x42\r\n\x0b_session_idB\x0c\n\n_signature\"\xab\x01\n\x0b\x43loseResult\x12\x17\n\nsession_id\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x14\n\x07tx_hash\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x12\x1b\n\x0e\x63\x61pture_amount\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x15\n\x08refunded\x18\x04 \x01(\x04H\x03\x88\x01\x01\x42\r\n\x0b_session_idB\n\n\x08_tx_hashB\x11\n\x0f_capture_amountB\x0b\n\t_refunded\"b\n\x0e\x43\x61talogVersion\x12\x1b\n\x0erate_card_hash\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x14\n\x07\x63\x61talog\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x42\x11\n\x0f_rate_card_hashB\n\n\x08_catalog\"\xa1\x03\n\x0bPricedUsage\x12\x12\n\x05model\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0erate_card_hash\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x12\x19\n\x0cinput_tokens\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x19\n\x0c\x63\x61\x63he_tokens\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x1a\n\routput_tokens\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x1e\n\x11\x61\x63\x63\x65ptance_run_id\x18\x06 \x01(\x0cH\x05\x88\x01\x01\x12*\n\x1d\x61\x63\x63\x65ptance_control_generation\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12!\n\x14\x61\x63\x63\x65ptance_signature\x18\x08 \x01(\x0cH\x07\x88\x01\x01\x42\x08\n\x06_modelB\x11\n\x0f_rate_card_hashB\x0f\n\r_input_tokensB\x0f\n\r_cache_tokensB\x10\n\x0e_output_tokensB\x14\n\x12_acceptance_run_idB \n\x1e_acceptance_control_generationB\x17\n\x15_acceptance_signature\"\x9a\x03\n\x08RunState\x12\x13\n\x06run_id\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x12\n\x05model\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0erate_card_hash\x18\x03 \x01(\x0cH\x02\x88\x01\x01\x12\x1f\n\x12\x63ontrol_generation\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x1b\n\x0e\x61uth_signature\x18\x05 \x01(\x0cH\x04\x88\x01\x01\x12\'\n\x06status\x18\x06 \x01(\x0e\x32\x12.mppi.v1.RunStatusH\x05\x88\x01\x01\x12\x19\n\x0cinput_tokens\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12\x19\n\x0c\x63\x61\x63he_tokens\x18\x08 \x01(\x04H\x07\x88\x01\x01\x12\x1a\n\routput_tokens\x18\t \x01(\x04H\x08\x88\x01\x01\x42\t\n\x07_run_idB\x08\n\x06_modelB\x11\n\x0f_rate_card_hashB\x15\n\x13_control_generationB\x11\n\x0f_auth_signatureB\t\n\x07_statusB\x0f\n\r_input_tokensB\x0f\n\r_cache_tokensB\x10\n\x0e_output_tokens\"\xbe\x01\n\x10\x43hainObservation\x12\x15\n\x08\x63hain_id\x18\x01 \x01(\x04H\x00\x88\x01\x01\x12\x1d\n\x10\x63ontract_address\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x12\x19\n\x0c\x62lock_number\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x17\n\nblock_hash\x18\x04 \x01(\x0cH\x03\x88\x01\x01\x42\x0b\n\t_chain_idB\x13\n\x11_contract_addressB\x0f\n\r_block_numberB\r\n\x0b_block_hash\"\xe8\x01\n\x16\x43onfirmedSettlementRef\x12.\n\x0bobservation\x18\x01 \x01(\x0b\x32\x19.mppi.v1.ChainObservation\x12\x14\n\x07tx_hash\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12\x17\n\nsession_id\x18\x03 \x01(\x0cH\x01\x88\x01\x01\x12\x1f\n\x12settled_cumulative\x18\x04 \x01(\x04H\x02\x88\x01\x01\x12\x12\n\x05\x64\x65lta\x18\x05 \x01(\x04H\x03\x88\x01\x01\x42\n\n\x08_tx_hashB\r\n\x0b_session_idB\x15\n\x13_settled_cumulativeB\x08\n\x06_delta\"U\n\rUpstreamError\x12\x18\n\x0bhttp_status\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04\x62ody\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x42\x0e\n\x0c_http_statusB\x07\n\x05_body\"\xf0\x02\n\x0cPaymentError\x12,\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x19.mppi.v1.PaymentErrorCodeH\x00\x88\x01\x01\x12\x17\n\nsession_id\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x12\x13\n\x06run_id\x18\x03 \x01(\x0cH\x02\x88\x01\x01\x12\x13\n\x06reason\x18\x04 \x01(\tH\x03\x88\x01\x01\x12%\n\x18requested_rate_card_hash\x18\x05 \x01(\x0cH\x04\x88\x01\x01\x12#\n\x16\x63urrent_rate_card_hash\x18\x06 \x01(\x0cH\x05\x88\x01\x01\x12-\n\x0bpause_level\x18\x07 \x01(\x0e\x32\x13.mppi.v1.PauseLevelH\x06\x88\x01\x01\x42\x07\n\x05_codeB\r\n\x0b_session_idB\t\n\x07_run_idB\t\n\x07_reasonB\x1b\n\x19_requested_rate_card_hashB\x19\n\x17_current_rate_card_hashB\x0e\n\x0c_pause_level*\x8f\x01\n\tRunStatus\x12\x1a\n\x16RUN_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14RUN_STATUS_COMPLETED\x10\x01\x12\x15\n\x11RUN_STATUS_FAILED\x10\x02\x12\x18\n\x14RUN_STATUS_CANCELLED\x10\x03\x12\x1b\n\x17RUN_STATUS_NOT_ADMITTED\x10\x04*\x7f\n\rSessionStatus\x12\x1e\n\x1aSESSION_STATUS_UNSPECIFIED\x10\x00\x12\x17\n\x13SESSION_STATUS_OPEN\x10\x01\x12\x1a\n\x16SESSION_STATUS_CLOSING\x10\x02\x12\x19\n\x15SESSION_STATUS_CLOSED\x10\x03*\x9e\x01\n\x0b\x44rainReason\x12\x1c\n\x18\x44RAIN_REASON_UNSPECIFIED\x10\x00\x12\"\n\x1e\x44RAIN_REASON_DEPOSIT_EXHAUSTED\x10\x01\x12(\n$DRAIN_REASON_AUTHORIZATION_EXHAUSTED\x10\x02\x12#\n\x1f\x44RAIN_REASON_PROVIDER_INITIATED\x10\x03*\xdd\x01\n\x10PaymentErrorCode\x12\"\n\x1ePAYMENT_ERROR_CODE_UNSPECIFIED\x10\x00\x12+\n\'PAYMENT_ERROR_CODE_INSUFFICIENT_DEPOSIT\x10\x01\x12(\n$PAYMENT_ERROR_CODE_SESSION_NOT_FOUND\x10\x02\x12$\n PAYMENT_ERROR_CODE_VOUCHER_STALE\x10\x03\x12(\n$PAYMENT_ERROR_CODE_SESSION_NOT_READY\x10\x04*Q\n\nPauseLevel\x12\x14\n\x10PAUSE_LEVEL_NONE\x10\x00\x12\x18\n\x14PAUSE_LEVEL_PAYMENTS\x10\x01\x12\x13\n\x0fPAUSE_LEVEL_ALL\x10\x02\x32\x45\n\x04\x43hat\x12=\n\x0b\x43ompletions\x12\x18.mppi.v1.CompleteRequest\x1a\x12.mppi.v1.ChatChunk0\x01\x32J\n\x07\x43ontrol\x12?\n\x07Session\x12\x17.mppi.v1.ControlMessage\x1a\x17.mppi.v1.ControlMessage(\x01\x30\x01\x62\x06proto3')
|
|
28
|
+
|
|
29
|
+
_globals = globals()
|
|
30
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'mppi.v1.mppi_pb2', _globals)
|
|
32
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
+
DESCRIPTOR._loaded_options = None
|
|
34
|
+
_globals['_RUNSTATUS']._serialized_start=7776
|
|
35
|
+
_globals['_RUNSTATUS']._serialized_end=7919
|
|
36
|
+
_globals['_SESSIONSTATUS']._serialized_start=7921
|
|
37
|
+
_globals['_SESSIONSTATUS']._serialized_end=8048
|
|
38
|
+
_globals['_DRAINREASON']._serialized_start=8051
|
|
39
|
+
_globals['_DRAINREASON']._serialized_end=8209
|
|
40
|
+
_globals['_PAYMENTERRORCODE']._serialized_start=8212
|
|
41
|
+
_globals['_PAYMENTERRORCODE']._serialized_end=8433
|
|
42
|
+
_globals['_PAUSELEVEL']._serialized_start=8435
|
|
43
|
+
_globals['_PAUSELEVEL']._serialized_end=8516
|
|
44
|
+
_globals['_COMPLETEREQUEST']._serialized_start=32
|
|
45
|
+
_globals['_COMPLETEREQUEST']._serialized_end=369
|
|
46
|
+
_globals['_CHATCHUNK']._serialized_start=371
|
|
47
|
+
_globals['_CHATCHUNK']._serialized_end=498
|
|
48
|
+
_globals['_TERMINAL']._serialized_start=501
|
|
49
|
+
_globals['_TERMINAL']._serialized_end=992
|
|
50
|
+
_globals['_CONTROLMESSAGE']._serialized_start=995
|
|
51
|
+
_globals['_CONTROLMESSAGE']._serialized_end=1649
|
|
52
|
+
_globals['_CHALLENGEREQUEST']._serialized_start=1651
|
|
53
|
+
_globals['_CHALLENGEREQUEST']._serialized_end=1739
|
|
54
|
+
_globals['_CHALLENGE']._serialized_start=1742
|
|
55
|
+
_globals['_CHALLENGE']._serialized_end=2143
|
|
56
|
+
_globals['_SESSIONOPEN']._serialized_start=2145
|
|
57
|
+
_globals['_SESSIONOPEN']._serialized_end=2268
|
|
58
|
+
_globals['_RECONNECTCHALLENGE']._serialized_start=2270
|
|
59
|
+
_globals['_RECONNECTCHALLENGE']._serialized_end=2320
|
|
60
|
+
_globals['_RECONNECTREQUEST']._serialized_start=2323
|
|
61
|
+
_globals['_RECONNECTREQUEST']._serialized_end=2564
|
|
62
|
+
_globals['_SESSIONSTATE']._serialized_start=2567
|
|
63
|
+
_globals['_SESSIONSTATE']._serialized_end=3423
|
|
64
|
+
_globals['_SESSIONDESCRIPTOR']._serialized_start=3426
|
|
65
|
+
_globals['_SESSIONDESCRIPTOR']._serialized_end=3697
|
|
66
|
+
_globals['_VOUCHER']._serialized_start=3699
|
|
67
|
+
_globals['_VOUCHER']._serialized_end=3826
|
|
68
|
+
_globals['_METER']._serialized_start=3829
|
|
69
|
+
_globals['_METER']._serialized_end=4068
|
|
70
|
+
_globals['_TOPUPNOTICE']._serialized_start=4071
|
|
71
|
+
_globals['_TOPUPNOTICE']._serialized_end=4258
|
|
72
|
+
_globals['_LOWCREDIT']._serialized_start=4261
|
|
73
|
+
_globals['_LOWCREDIT']._serialized_end=4556
|
|
74
|
+
_globals['_COVERAGEREQUEST']._serialized_start=4559
|
|
75
|
+
_globals['_COVERAGEREQUEST']._serialized_end=4716
|
|
76
|
+
_globals['_REQUIREDTOKENS']._serialized_start=4719
|
|
77
|
+
_globals['_REQUIREDTOKENS']._serialized_end=4947
|
|
78
|
+
_globals['_DRAIN']._serialized_start=4950
|
|
79
|
+
_globals['_DRAIN']._serialized_end=5083
|
|
80
|
+
_globals['_RECEIPT']._serialized_start=5086
|
|
81
|
+
_globals['_RECEIPT']._serialized_end=5686
|
|
82
|
+
_globals['_CLOSEREQUEST']._serialized_start=5688
|
|
83
|
+
_globals['_CLOSEREQUEST']._serialized_end=5780
|
|
84
|
+
_globals['_CLOSERESULT']._serialized_start=5783
|
|
85
|
+
_globals['_CLOSERESULT']._serialized_end=5954
|
|
86
|
+
_globals['_CATALOGVERSION']._serialized_start=5956
|
|
87
|
+
_globals['_CATALOGVERSION']._serialized_end=6054
|
|
88
|
+
_globals['_PRICEDUSAGE']._serialized_start=6057
|
|
89
|
+
_globals['_PRICEDUSAGE']._serialized_end=6474
|
|
90
|
+
_globals['_RUNSTATE']._serialized_start=6477
|
|
91
|
+
_globals['_RUNSTATE']._serialized_end=6887
|
|
92
|
+
_globals['_CHAINOBSERVATION']._serialized_start=6890
|
|
93
|
+
_globals['_CHAINOBSERVATION']._serialized_end=7080
|
|
94
|
+
_globals['_CONFIRMEDSETTLEMENTREF']._serialized_start=7083
|
|
95
|
+
_globals['_CONFIRMEDSETTLEMENTREF']._serialized_end=7315
|
|
96
|
+
_globals['_UPSTREAMERROR']._serialized_start=7317
|
|
97
|
+
_globals['_UPSTREAMERROR']._serialized_end=7402
|
|
98
|
+
_globals['_PAYMENTERROR']._serialized_start=7405
|
|
99
|
+
_globals['_PAYMENTERROR']._serialized_end=7773
|
|
100
|
+
_globals['_CHAT']._serialized_start=8518
|
|
101
|
+
_globals['_CHAT']._serialized_end=8587
|
|
102
|
+
_globals['_CONTROL']._serialized_start=8589
|
|
103
|
+
_globals['_CONTROL']._serialized_end=8663
|
|
104
|
+
# @@protoc_insertion_point(module_scope)
|
mppi/v1/mppi_pb2.pyi
ADDED
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
from google.protobuf.internal import containers as _containers
|
|
2
|
+
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
|
3
|
+
from google.protobuf import descriptor as _descriptor
|
|
4
|
+
from google.protobuf import message as _message
|
|
5
|
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
|
6
|
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
|
7
|
+
|
|
8
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
9
|
+
|
|
10
|
+
class RunStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
11
|
+
__slots__ = ()
|
|
12
|
+
RUN_STATUS_UNSPECIFIED: _ClassVar[RunStatus]
|
|
13
|
+
RUN_STATUS_COMPLETED: _ClassVar[RunStatus]
|
|
14
|
+
RUN_STATUS_FAILED: _ClassVar[RunStatus]
|
|
15
|
+
RUN_STATUS_CANCELLED: _ClassVar[RunStatus]
|
|
16
|
+
RUN_STATUS_NOT_ADMITTED: _ClassVar[RunStatus]
|
|
17
|
+
|
|
18
|
+
class SessionStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
19
|
+
__slots__ = ()
|
|
20
|
+
SESSION_STATUS_UNSPECIFIED: _ClassVar[SessionStatus]
|
|
21
|
+
SESSION_STATUS_OPEN: _ClassVar[SessionStatus]
|
|
22
|
+
SESSION_STATUS_CLOSING: _ClassVar[SessionStatus]
|
|
23
|
+
SESSION_STATUS_CLOSED: _ClassVar[SessionStatus]
|
|
24
|
+
|
|
25
|
+
class DrainReason(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
26
|
+
__slots__ = ()
|
|
27
|
+
DRAIN_REASON_UNSPECIFIED: _ClassVar[DrainReason]
|
|
28
|
+
DRAIN_REASON_DEPOSIT_EXHAUSTED: _ClassVar[DrainReason]
|
|
29
|
+
DRAIN_REASON_AUTHORIZATION_EXHAUSTED: _ClassVar[DrainReason]
|
|
30
|
+
DRAIN_REASON_PROVIDER_INITIATED: _ClassVar[DrainReason]
|
|
31
|
+
|
|
32
|
+
class PaymentErrorCode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
33
|
+
__slots__ = ()
|
|
34
|
+
PAYMENT_ERROR_CODE_UNSPECIFIED: _ClassVar[PaymentErrorCode]
|
|
35
|
+
PAYMENT_ERROR_CODE_INSUFFICIENT_DEPOSIT: _ClassVar[PaymentErrorCode]
|
|
36
|
+
PAYMENT_ERROR_CODE_SESSION_NOT_FOUND: _ClassVar[PaymentErrorCode]
|
|
37
|
+
PAYMENT_ERROR_CODE_VOUCHER_STALE: _ClassVar[PaymentErrorCode]
|
|
38
|
+
PAYMENT_ERROR_CODE_SESSION_NOT_READY: _ClassVar[PaymentErrorCode]
|
|
39
|
+
|
|
40
|
+
class PauseLevel(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
41
|
+
__slots__ = ()
|
|
42
|
+
PAUSE_LEVEL_NONE: _ClassVar[PauseLevel]
|
|
43
|
+
PAUSE_LEVEL_PAYMENTS: _ClassVar[PauseLevel]
|
|
44
|
+
PAUSE_LEVEL_ALL: _ClassVar[PauseLevel]
|
|
45
|
+
RUN_STATUS_UNSPECIFIED: RunStatus
|
|
46
|
+
RUN_STATUS_COMPLETED: RunStatus
|
|
47
|
+
RUN_STATUS_FAILED: RunStatus
|
|
48
|
+
RUN_STATUS_CANCELLED: RunStatus
|
|
49
|
+
RUN_STATUS_NOT_ADMITTED: RunStatus
|
|
50
|
+
SESSION_STATUS_UNSPECIFIED: SessionStatus
|
|
51
|
+
SESSION_STATUS_OPEN: SessionStatus
|
|
52
|
+
SESSION_STATUS_CLOSING: SessionStatus
|
|
53
|
+
SESSION_STATUS_CLOSED: SessionStatus
|
|
54
|
+
DRAIN_REASON_UNSPECIFIED: DrainReason
|
|
55
|
+
DRAIN_REASON_DEPOSIT_EXHAUSTED: DrainReason
|
|
56
|
+
DRAIN_REASON_AUTHORIZATION_EXHAUSTED: DrainReason
|
|
57
|
+
DRAIN_REASON_PROVIDER_INITIATED: DrainReason
|
|
58
|
+
PAYMENT_ERROR_CODE_UNSPECIFIED: PaymentErrorCode
|
|
59
|
+
PAYMENT_ERROR_CODE_INSUFFICIENT_DEPOSIT: PaymentErrorCode
|
|
60
|
+
PAYMENT_ERROR_CODE_SESSION_NOT_FOUND: PaymentErrorCode
|
|
61
|
+
PAYMENT_ERROR_CODE_VOUCHER_STALE: PaymentErrorCode
|
|
62
|
+
PAYMENT_ERROR_CODE_SESSION_NOT_READY: PaymentErrorCode
|
|
63
|
+
PAUSE_LEVEL_NONE: PauseLevel
|
|
64
|
+
PAUSE_LEVEL_PAYMENTS: PauseLevel
|
|
65
|
+
PAUSE_LEVEL_ALL: PauseLevel
|
|
66
|
+
|
|
67
|
+
class CompleteRequest(_message.Message):
|
|
68
|
+
__slots__ = ("model", "stream", "session_id", "run_id", "control_generation", "rate_card_hash", "auth_signature", "payload")
|
|
69
|
+
MODEL_FIELD_NUMBER: _ClassVar[int]
|
|
70
|
+
STREAM_FIELD_NUMBER: _ClassVar[int]
|
|
71
|
+
SESSION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
72
|
+
RUN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
73
|
+
CONTROL_GENERATION_FIELD_NUMBER: _ClassVar[int]
|
|
74
|
+
RATE_CARD_HASH_FIELD_NUMBER: _ClassVar[int]
|
|
75
|
+
AUTH_SIGNATURE_FIELD_NUMBER: _ClassVar[int]
|
|
76
|
+
PAYLOAD_FIELD_NUMBER: _ClassVar[int]
|
|
77
|
+
model: str
|
|
78
|
+
stream: bool
|
|
79
|
+
session_id: bytes
|
|
80
|
+
run_id: bytes
|
|
81
|
+
control_generation: int
|
|
82
|
+
rate_card_hash: bytes
|
|
83
|
+
auth_signature: bytes
|
|
84
|
+
payload: bytes
|
|
85
|
+
def __init__(self, model: _Optional[str] = ..., stream: _Optional[bool] = ..., session_id: _Optional[bytes] = ..., run_id: _Optional[bytes] = ..., control_generation: _Optional[int] = ..., rate_card_hash: _Optional[bytes] = ..., auth_signature: _Optional[bytes] = ..., payload: _Optional[bytes] = ...) -> None: ...
|
|
86
|
+
|
|
87
|
+
class ChatChunk(_message.Message):
|
|
88
|
+
__slots__ = ("payload", "terminal", "upstream_error")
|
|
89
|
+
PAYLOAD_FIELD_NUMBER: _ClassVar[int]
|
|
90
|
+
TERMINAL_FIELD_NUMBER: _ClassVar[int]
|
|
91
|
+
UPSTREAM_ERROR_FIELD_NUMBER: _ClassVar[int]
|
|
92
|
+
payload: bytes
|
|
93
|
+
terminal: Terminal
|
|
94
|
+
upstream_error: UpstreamError
|
|
95
|
+
def __init__(self, payload: _Optional[bytes] = ..., terminal: _Optional[_Union[Terminal, _Mapping]] = ..., upstream_error: _Optional[_Union[UpstreamError, _Mapping]] = ...) -> None: ...
|
|
96
|
+
|
|
97
|
+
class Terminal(_message.Message):
|
|
98
|
+
__slots__ = ("input_tokens", "cache_tokens", "output_tokens", "amount", "session_id", "run_id", "model", "rate_card_hash", "status", "final_meter_seq", "settlement_reference")
|
|
99
|
+
INPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
100
|
+
CACHE_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
101
|
+
OUTPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
102
|
+
AMOUNT_FIELD_NUMBER: _ClassVar[int]
|
|
103
|
+
SESSION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
104
|
+
RUN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
105
|
+
MODEL_FIELD_NUMBER: _ClassVar[int]
|
|
106
|
+
RATE_CARD_HASH_FIELD_NUMBER: _ClassVar[int]
|
|
107
|
+
STATUS_FIELD_NUMBER: _ClassVar[int]
|
|
108
|
+
FINAL_METER_SEQ_FIELD_NUMBER: _ClassVar[int]
|
|
109
|
+
SETTLEMENT_REFERENCE_FIELD_NUMBER: _ClassVar[int]
|
|
110
|
+
input_tokens: int
|
|
111
|
+
cache_tokens: int
|
|
112
|
+
output_tokens: int
|
|
113
|
+
amount: int
|
|
114
|
+
session_id: bytes
|
|
115
|
+
run_id: bytes
|
|
116
|
+
model: str
|
|
117
|
+
rate_card_hash: bytes
|
|
118
|
+
status: RunStatus
|
|
119
|
+
final_meter_seq: int
|
|
120
|
+
settlement_reference: ConfirmedSettlementRef
|
|
121
|
+
def __init__(self, input_tokens: _Optional[int] = ..., cache_tokens: _Optional[int] = ..., output_tokens: _Optional[int] = ..., amount: _Optional[int] = ..., session_id: _Optional[bytes] = ..., run_id: _Optional[bytes] = ..., model: _Optional[str] = ..., rate_card_hash: _Optional[bytes] = ..., status: _Optional[_Union[RunStatus, str]] = ..., final_meter_seq: _Optional[int] = ..., settlement_reference: _Optional[_Union[ConfirmedSettlementRef, _Mapping]] = ...) -> None: ...
|
|
122
|
+
|
|
123
|
+
class ControlMessage(_message.Message):
|
|
124
|
+
__slots__ = ("challenge_request", "challenge", "session_open", "reconnect_challenge", "reconnect_request", "session_state", "voucher", "meter", "top_up_notice", "low_credit", "drain", "receipt", "close_request", "close_result")
|
|
125
|
+
CHALLENGE_REQUEST_FIELD_NUMBER: _ClassVar[int]
|
|
126
|
+
CHALLENGE_FIELD_NUMBER: _ClassVar[int]
|
|
127
|
+
SESSION_OPEN_FIELD_NUMBER: _ClassVar[int]
|
|
128
|
+
RECONNECT_CHALLENGE_FIELD_NUMBER: _ClassVar[int]
|
|
129
|
+
RECONNECT_REQUEST_FIELD_NUMBER: _ClassVar[int]
|
|
130
|
+
SESSION_STATE_FIELD_NUMBER: _ClassVar[int]
|
|
131
|
+
VOUCHER_FIELD_NUMBER: _ClassVar[int]
|
|
132
|
+
METER_FIELD_NUMBER: _ClassVar[int]
|
|
133
|
+
TOP_UP_NOTICE_FIELD_NUMBER: _ClassVar[int]
|
|
134
|
+
LOW_CREDIT_FIELD_NUMBER: _ClassVar[int]
|
|
135
|
+
DRAIN_FIELD_NUMBER: _ClassVar[int]
|
|
136
|
+
RECEIPT_FIELD_NUMBER: _ClassVar[int]
|
|
137
|
+
CLOSE_REQUEST_FIELD_NUMBER: _ClassVar[int]
|
|
138
|
+
CLOSE_RESULT_FIELD_NUMBER: _ClassVar[int]
|
|
139
|
+
challenge_request: ChallengeRequest
|
|
140
|
+
challenge: Challenge
|
|
141
|
+
session_open: SessionOpen
|
|
142
|
+
reconnect_challenge: ReconnectChallenge
|
|
143
|
+
reconnect_request: ReconnectRequest
|
|
144
|
+
session_state: SessionState
|
|
145
|
+
voucher: Voucher
|
|
146
|
+
meter: Meter
|
|
147
|
+
top_up_notice: TopUpNotice
|
|
148
|
+
low_credit: LowCredit
|
|
149
|
+
drain: Drain
|
|
150
|
+
receipt: Receipt
|
|
151
|
+
close_request: CloseRequest
|
|
152
|
+
close_result: CloseResult
|
|
153
|
+
def __init__(self, challenge_request: _Optional[_Union[ChallengeRequest, _Mapping]] = ..., challenge: _Optional[_Union[Challenge, _Mapping]] = ..., session_open: _Optional[_Union[SessionOpen, _Mapping]] = ..., reconnect_challenge: _Optional[_Union[ReconnectChallenge, _Mapping]] = ..., reconnect_request: _Optional[_Union[ReconnectRequest, _Mapping]] = ..., session_state: _Optional[_Union[SessionState, _Mapping]] = ..., voucher: _Optional[_Union[Voucher, _Mapping]] = ..., meter: _Optional[_Union[Meter, _Mapping]] = ..., top_up_notice: _Optional[_Union[TopUpNotice, _Mapping]] = ..., low_credit: _Optional[_Union[LowCredit, _Mapping]] = ..., drain: _Optional[_Union[Drain, _Mapping]] = ..., receipt: _Optional[_Union[Receipt, _Mapping]] = ..., close_request: _Optional[_Union[CloseRequest, _Mapping]] = ..., close_result: _Optional[_Union[CloseResult, _Mapping]] = ...) -> None: ...
|
|
154
|
+
|
|
155
|
+
class ChallengeRequest(_message.Message):
|
|
156
|
+
__slots__ = ("request_id", "model")
|
|
157
|
+
REQUEST_ID_FIELD_NUMBER: _ClassVar[int]
|
|
158
|
+
MODEL_FIELD_NUMBER: _ClassVar[int]
|
|
159
|
+
request_id: bytes
|
|
160
|
+
model: str
|
|
161
|
+
def __init__(self, request_id: _Optional[bytes] = ..., model: _Optional[str] = ...) -> None: ...
|
|
162
|
+
|
|
163
|
+
class Challenge(_message.Message):
|
|
164
|
+
__slots__ = ("request_id", "model", "rate_card_hash", "provider_id", "contract", "chain_id", "operator", "cover_output_tokens", "suggest_session_tokens")
|
|
165
|
+
REQUEST_ID_FIELD_NUMBER: _ClassVar[int]
|
|
166
|
+
MODEL_FIELD_NUMBER: _ClassVar[int]
|
|
167
|
+
RATE_CARD_HASH_FIELD_NUMBER: _ClassVar[int]
|
|
168
|
+
PROVIDER_ID_FIELD_NUMBER: _ClassVar[int]
|
|
169
|
+
CONTRACT_FIELD_NUMBER: _ClassVar[int]
|
|
170
|
+
CHAIN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
171
|
+
OPERATOR_FIELD_NUMBER: _ClassVar[int]
|
|
172
|
+
COVER_OUTPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
173
|
+
SUGGEST_SESSION_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
174
|
+
request_id: bytes
|
|
175
|
+
model: str
|
|
176
|
+
rate_card_hash: bytes
|
|
177
|
+
provider_id: bytes
|
|
178
|
+
contract: bytes
|
|
179
|
+
chain_id: int
|
|
180
|
+
operator: bytes
|
|
181
|
+
cover_output_tokens: int
|
|
182
|
+
suggest_session_tokens: int
|
|
183
|
+
def __init__(self, request_id: _Optional[bytes] = ..., model: _Optional[str] = ..., rate_card_hash: _Optional[bytes] = ..., provider_id: _Optional[bytes] = ..., contract: _Optional[bytes] = ..., chain_id: _Optional[int] = ..., operator: _Optional[bytes] = ..., cover_output_tokens: _Optional[int] = ..., suggest_session_tokens: _Optional[int] = ...) -> None: ...
|
|
184
|
+
|
|
185
|
+
class SessionOpen(_message.Message):
|
|
186
|
+
__slots__ = ("session_id", "open_tx", "agent_id")
|
|
187
|
+
SESSION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
188
|
+
OPEN_TX_FIELD_NUMBER: _ClassVar[int]
|
|
189
|
+
AGENT_ID_FIELD_NUMBER: _ClassVar[int]
|
|
190
|
+
session_id: bytes
|
|
191
|
+
open_tx: bytes
|
|
192
|
+
agent_id: bytes
|
|
193
|
+
def __init__(self, session_id: _Optional[bytes] = ..., open_tx: _Optional[bytes] = ..., agent_id: _Optional[bytes] = ...) -> None: ...
|
|
194
|
+
|
|
195
|
+
class ReconnectChallenge(_message.Message):
|
|
196
|
+
__slots__ = ("nonce",)
|
|
197
|
+
NONCE_FIELD_NUMBER: _ClassVar[int]
|
|
198
|
+
nonce: bytes
|
|
199
|
+
def __init__(self, nonce: _Optional[bytes] = ...) -> None: ...
|
|
200
|
+
|
|
201
|
+
class ReconnectRequest(_message.Message):
|
|
202
|
+
__slots__ = ("session_id", "nonce", "signature", "latest_voucher", "last_meter_seq", "pending_run_ids")
|
|
203
|
+
SESSION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
204
|
+
NONCE_FIELD_NUMBER: _ClassVar[int]
|
|
205
|
+
SIGNATURE_FIELD_NUMBER: _ClassVar[int]
|
|
206
|
+
LATEST_VOUCHER_FIELD_NUMBER: _ClassVar[int]
|
|
207
|
+
LAST_METER_SEQ_FIELD_NUMBER: _ClassVar[int]
|
|
208
|
+
PENDING_RUN_IDS_FIELD_NUMBER: _ClassVar[int]
|
|
209
|
+
session_id: bytes
|
|
210
|
+
nonce: bytes
|
|
211
|
+
signature: bytes
|
|
212
|
+
latest_voucher: Voucher
|
|
213
|
+
last_meter_seq: int
|
|
214
|
+
pending_run_ids: _containers.RepeatedScalarFieldContainer[bytes]
|
|
215
|
+
def __init__(self, session_id: _Optional[bytes] = ..., nonce: _Optional[bytes] = ..., signature: _Optional[bytes] = ..., latest_voucher: _Optional[_Union[Voucher, _Mapping]] = ..., last_meter_seq: _Optional[int] = ..., pending_run_ids: _Optional[_Iterable[bytes]] = ...) -> None: ...
|
|
216
|
+
|
|
217
|
+
class SessionState(_message.Message):
|
|
218
|
+
__slots__ = ("session_id", "nonce", "control_generation", "ready", "close_pending", "descriptor", "accepted_voucher", "meter_seq", "usage_by_price", "run_states", "catalogs", "initial_rate_card_hash", "current_rate_card_hash", "deposit", "settled_cumulative", "status", "chain_block_number", "chain_block_hash")
|
|
219
|
+
SESSION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
220
|
+
NONCE_FIELD_NUMBER: _ClassVar[int]
|
|
221
|
+
CONTROL_GENERATION_FIELD_NUMBER: _ClassVar[int]
|
|
222
|
+
READY_FIELD_NUMBER: _ClassVar[int]
|
|
223
|
+
CLOSE_PENDING_FIELD_NUMBER: _ClassVar[int]
|
|
224
|
+
DESCRIPTOR_FIELD_NUMBER: _ClassVar[int]
|
|
225
|
+
ACCEPTED_VOUCHER_FIELD_NUMBER: _ClassVar[int]
|
|
226
|
+
METER_SEQ_FIELD_NUMBER: _ClassVar[int]
|
|
227
|
+
USAGE_BY_PRICE_FIELD_NUMBER: _ClassVar[int]
|
|
228
|
+
RUN_STATES_FIELD_NUMBER: _ClassVar[int]
|
|
229
|
+
CATALOGS_FIELD_NUMBER: _ClassVar[int]
|
|
230
|
+
INITIAL_RATE_CARD_HASH_FIELD_NUMBER: _ClassVar[int]
|
|
231
|
+
CURRENT_RATE_CARD_HASH_FIELD_NUMBER: _ClassVar[int]
|
|
232
|
+
DEPOSIT_FIELD_NUMBER: _ClassVar[int]
|
|
233
|
+
SETTLED_CUMULATIVE_FIELD_NUMBER: _ClassVar[int]
|
|
234
|
+
STATUS_FIELD_NUMBER: _ClassVar[int]
|
|
235
|
+
CHAIN_BLOCK_NUMBER_FIELD_NUMBER: _ClassVar[int]
|
|
236
|
+
CHAIN_BLOCK_HASH_FIELD_NUMBER: _ClassVar[int]
|
|
237
|
+
session_id: bytes
|
|
238
|
+
nonce: bytes
|
|
239
|
+
control_generation: int
|
|
240
|
+
ready: bool
|
|
241
|
+
close_pending: bool
|
|
242
|
+
descriptor: SessionDescriptor
|
|
243
|
+
accepted_voucher: Voucher
|
|
244
|
+
meter_seq: int
|
|
245
|
+
usage_by_price: _containers.RepeatedCompositeFieldContainer[PricedUsage]
|
|
246
|
+
run_states: _containers.RepeatedCompositeFieldContainer[RunState]
|
|
247
|
+
catalogs: _containers.RepeatedCompositeFieldContainer[CatalogVersion]
|
|
248
|
+
initial_rate_card_hash: bytes
|
|
249
|
+
current_rate_card_hash: bytes
|
|
250
|
+
deposit: int
|
|
251
|
+
settled_cumulative: int
|
|
252
|
+
status: SessionStatus
|
|
253
|
+
chain_block_number: int
|
|
254
|
+
chain_block_hash: bytes
|
|
255
|
+
def __init__(self, session_id: _Optional[bytes] = ..., nonce: _Optional[bytes] = ..., control_generation: _Optional[int] = ..., ready: _Optional[bool] = ..., close_pending: _Optional[bool] = ..., descriptor: _Optional[_Union[SessionDescriptor, _Mapping]] = ..., accepted_voucher: _Optional[_Union[Voucher, _Mapping]] = ..., meter_seq: _Optional[int] = ..., usage_by_price: _Optional[_Iterable[_Union[PricedUsage, _Mapping]]] = ..., run_states: _Optional[_Iterable[_Union[RunState, _Mapping]]] = ..., catalogs: _Optional[_Iterable[_Union[CatalogVersion, _Mapping]]] = ..., initial_rate_card_hash: _Optional[bytes] = ..., current_rate_card_hash: _Optional[bytes] = ..., deposit: _Optional[int] = ..., settled_cumulative: _Optional[int] = ..., status: _Optional[_Union[SessionStatus, str]] = ..., chain_block_number: _Optional[int] = ..., chain_block_hash: _Optional[bytes] = ...) -> None: ...
|
|
256
|
+
|
|
257
|
+
class SessionDescriptor(_message.Message):
|
|
258
|
+
__slots__ = ("agent", "session_signer", "provider_id", "recipient", "operator", "token", "salt")
|
|
259
|
+
AGENT_FIELD_NUMBER: _ClassVar[int]
|
|
260
|
+
SESSION_SIGNER_FIELD_NUMBER: _ClassVar[int]
|
|
261
|
+
PROVIDER_ID_FIELD_NUMBER: _ClassVar[int]
|
|
262
|
+
RECIPIENT_FIELD_NUMBER: _ClassVar[int]
|
|
263
|
+
OPERATOR_FIELD_NUMBER: _ClassVar[int]
|
|
264
|
+
TOKEN_FIELD_NUMBER: _ClassVar[int]
|
|
265
|
+
SALT_FIELD_NUMBER: _ClassVar[int]
|
|
266
|
+
agent: bytes
|
|
267
|
+
session_signer: bytes
|
|
268
|
+
provider_id: bytes
|
|
269
|
+
recipient: bytes
|
|
270
|
+
operator: bytes
|
|
271
|
+
token: bytes
|
|
272
|
+
salt: bytes
|
|
273
|
+
def __init__(self, agent: _Optional[bytes] = ..., session_signer: _Optional[bytes] = ..., provider_id: _Optional[bytes] = ..., recipient: _Optional[bytes] = ..., operator: _Optional[bytes] = ..., token: _Optional[bytes] = ..., salt: _Optional[bytes] = ...) -> None: ...
|
|
274
|
+
|
|
275
|
+
class Voucher(_message.Message):
|
|
276
|
+
__slots__ = ("session_id", "cumulative", "signature")
|
|
277
|
+
SESSION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
278
|
+
CUMULATIVE_FIELD_NUMBER: _ClassVar[int]
|
|
279
|
+
SIGNATURE_FIELD_NUMBER: _ClassVar[int]
|
|
280
|
+
session_id: bytes
|
|
281
|
+
cumulative: int
|
|
282
|
+
signature: bytes
|
|
283
|
+
def __init__(self, session_id: _Optional[bytes] = ..., cumulative: _Optional[int] = ..., signature: _Optional[bytes] = ...) -> None: ...
|
|
284
|
+
|
|
285
|
+
class Meter(_message.Message):
|
|
286
|
+
__slots__ = ("session_id", "run_id", "seq", "input_tokens", "cache_tokens", "output_tokens")
|
|
287
|
+
SESSION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
288
|
+
RUN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
289
|
+
SEQ_FIELD_NUMBER: _ClassVar[int]
|
|
290
|
+
INPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
291
|
+
CACHE_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
292
|
+
OUTPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
293
|
+
session_id: bytes
|
|
294
|
+
run_id: bytes
|
|
295
|
+
seq: int
|
|
296
|
+
input_tokens: int
|
|
297
|
+
cache_tokens: int
|
|
298
|
+
output_tokens: int
|
|
299
|
+
def __init__(self, session_id: _Optional[bytes] = ..., run_id: _Optional[bytes] = ..., seq: _Optional[int] = ..., input_tokens: _Optional[int] = ..., cache_tokens: _Optional[int] = ..., output_tokens: _Optional[int] = ...) -> None: ...
|
|
300
|
+
|
|
301
|
+
class TopUpNotice(_message.Message):
|
|
302
|
+
__slots__ = ("session_id", "tx", "model", "rate_card_hash", "tokens")
|
|
303
|
+
SESSION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
304
|
+
TX_FIELD_NUMBER: _ClassVar[int]
|
|
305
|
+
MODEL_FIELD_NUMBER: _ClassVar[int]
|
|
306
|
+
RATE_CARD_HASH_FIELD_NUMBER: _ClassVar[int]
|
|
307
|
+
TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
308
|
+
session_id: bytes
|
|
309
|
+
tx: bytes
|
|
310
|
+
model: str
|
|
311
|
+
rate_card_hash: bytes
|
|
312
|
+
tokens: int
|
|
313
|
+
def __init__(self, session_id: _Optional[bytes] = ..., tx: _Optional[bytes] = ..., model: _Optional[str] = ..., rate_card_hash: _Optional[bytes] = ..., tokens: _Optional[int] = ...) -> None: ...
|
|
314
|
+
|
|
315
|
+
class LowCredit(_message.Message):
|
|
316
|
+
__slots__ = ("session_id", "model", "rate_card_hash", "remaining_tokens", "suggest_top_up_tokens", "coverage_request")
|
|
317
|
+
SESSION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
318
|
+
MODEL_FIELD_NUMBER: _ClassVar[int]
|
|
319
|
+
RATE_CARD_HASH_FIELD_NUMBER: _ClassVar[int]
|
|
320
|
+
REMAINING_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
321
|
+
SUGGEST_TOP_UP_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
322
|
+
COVERAGE_REQUEST_FIELD_NUMBER: _ClassVar[int]
|
|
323
|
+
session_id: bytes
|
|
324
|
+
model: str
|
|
325
|
+
rate_card_hash: bytes
|
|
326
|
+
remaining_tokens: int
|
|
327
|
+
suggest_top_up_tokens: int
|
|
328
|
+
coverage_request: CoverageRequest
|
|
329
|
+
def __init__(self, session_id: _Optional[bytes] = ..., model: _Optional[str] = ..., rate_card_hash: _Optional[bytes] = ..., remaining_tokens: _Optional[int] = ..., suggest_top_up_tokens: _Optional[int] = ..., coverage_request: _Optional[_Union[CoverageRequest, _Mapping]] = ...) -> None: ...
|
|
330
|
+
|
|
331
|
+
class CoverageRequest(_message.Message):
|
|
332
|
+
__slots__ = ("run_id", "control_generation", "required_by_price")
|
|
333
|
+
RUN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
334
|
+
CONTROL_GENERATION_FIELD_NUMBER: _ClassVar[int]
|
|
335
|
+
REQUIRED_BY_PRICE_FIELD_NUMBER: _ClassVar[int]
|
|
336
|
+
run_id: bytes
|
|
337
|
+
control_generation: int
|
|
338
|
+
required_by_price: _containers.RepeatedCompositeFieldContainer[RequiredTokens]
|
|
339
|
+
def __init__(self, run_id: _Optional[bytes] = ..., control_generation: _Optional[int] = ..., required_by_price: _Optional[_Iterable[_Union[RequiredTokens, _Mapping]]] = ...) -> None: ...
|
|
340
|
+
|
|
341
|
+
class RequiredTokens(_message.Message):
|
|
342
|
+
__slots__ = ("model", "rate_card_hash", "input_tokens", "cache_tokens", "output_tokens")
|
|
343
|
+
MODEL_FIELD_NUMBER: _ClassVar[int]
|
|
344
|
+
RATE_CARD_HASH_FIELD_NUMBER: _ClassVar[int]
|
|
345
|
+
INPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
346
|
+
CACHE_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
347
|
+
OUTPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
348
|
+
model: str
|
|
349
|
+
rate_card_hash: bytes
|
|
350
|
+
input_tokens: int
|
|
351
|
+
cache_tokens: int
|
|
352
|
+
output_tokens: int
|
|
353
|
+
def __init__(self, model: _Optional[str] = ..., rate_card_hash: _Optional[bytes] = ..., input_tokens: _Optional[int] = ..., cache_tokens: _Optional[int] = ..., output_tokens: _Optional[int] = ...) -> None: ...
|
|
354
|
+
|
|
355
|
+
class Drain(_message.Message):
|
|
356
|
+
__slots__ = ("session_id", "run_id", "reason")
|
|
357
|
+
SESSION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
358
|
+
RUN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
359
|
+
REASON_FIELD_NUMBER: _ClassVar[int]
|
|
360
|
+
session_id: bytes
|
|
361
|
+
run_id: bytes
|
|
362
|
+
reason: DrainReason
|
|
363
|
+
def __init__(self, session_id: _Optional[bytes] = ..., run_id: _Optional[bytes] = ..., reason: _Optional[_Union[DrainReason, str]] = ...) -> None: ...
|
|
364
|
+
|
|
365
|
+
class Receipt(_message.Message):
|
|
366
|
+
__slots__ = ("session_id", "run_id", "model", "rate_card_hash", "input_tokens", "output_tokens", "amount", "settled_cumulative", "cache_tokens", "status", "final_meter_seq", "chain_observation", "settlement_reference")
|
|
367
|
+
SESSION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
368
|
+
RUN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
369
|
+
MODEL_FIELD_NUMBER: _ClassVar[int]
|
|
370
|
+
RATE_CARD_HASH_FIELD_NUMBER: _ClassVar[int]
|
|
371
|
+
INPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
372
|
+
OUTPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
373
|
+
AMOUNT_FIELD_NUMBER: _ClassVar[int]
|
|
374
|
+
SETTLED_CUMULATIVE_FIELD_NUMBER: _ClassVar[int]
|
|
375
|
+
CACHE_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
376
|
+
STATUS_FIELD_NUMBER: _ClassVar[int]
|
|
377
|
+
FINAL_METER_SEQ_FIELD_NUMBER: _ClassVar[int]
|
|
378
|
+
CHAIN_OBSERVATION_FIELD_NUMBER: _ClassVar[int]
|
|
379
|
+
SETTLEMENT_REFERENCE_FIELD_NUMBER: _ClassVar[int]
|
|
380
|
+
session_id: bytes
|
|
381
|
+
run_id: bytes
|
|
382
|
+
model: str
|
|
383
|
+
rate_card_hash: bytes
|
|
384
|
+
input_tokens: int
|
|
385
|
+
output_tokens: int
|
|
386
|
+
amount: int
|
|
387
|
+
settled_cumulative: int
|
|
388
|
+
cache_tokens: int
|
|
389
|
+
status: RunStatus
|
|
390
|
+
final_meter_seq: int
|
|
391
|
+
chain_observation: ChainObservation
|
|
392
|
+
settlement_reference: ConfirmedSettlementRef
|
|
393
|
+
def __init__(self, session_id: _Optional[bytes] = ..., run_id: _Optional[bytes] = ..., model: _Optional[str] = ..., rate_card_hash: _Optional[bytes] = ..., input_tokens: _Optional[int] = ..., output_tokens: _Optional[int] = ..., amount: _Optional[int] = ..., settled_cumulative: _Optional[int] = ..., cache_tokens: _Optional[int] = ..., status: _Optional[_Union[RunStatus, str]] = ..., final_meter_seq: _Optional[int] = ..., chain_observation: _Optional[_Union[ChainObservation, _Mapping]] = ..., settlement_reference: _Optional[_Union[ConfirmedSettlementRef, _Mapping]] = ...) -> None: ...
|
|
394
|
+
|
|
395
|
+
class CloseRequest(_message.Message):
|
|
396
|
+
__slots__ = ("session_id", "signature")
|
|
397
|
+
SESSION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
398
|
+
SIGNATURE_FIELD_NUMBER: _ClassVar[int]
|
|
399
|
+
session_id: bytes
|
|
400
|
+
signature: bytes
|
|
401
|
+
def __init__(self, session_id: _Optional[bytes] = ..., signature: _Optional[bytes] = ...) -> None: ...
|
|
402
|
+
|
|
403
|
+
class CloseResult(_message.Message):
|
|
404
|
+
__slots__ = ("session_id", "tx_hash", "capture_amount", "refunded")
|
|
405
|
+
SESSION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
406
|
+
TX_HASH_FIELD_NUMBER: _ClassVar[int]
|
|
407
|
+
CAPTURE_AMOUNT_FIELD_NUMBER: _ClassVar[int]
|
|
408
|
+
REFUNDED_FIELD_NUMBER: _ClassVar[int]
|
|
409
|
+
session_id: bytes
|
|
410
|
+
tx_hash: bytes
|
|
411
|
+
capture_amount: int
|
|
412
|
+
refunded: int
|
|
413
|
+
def __init__(self, session_id: _Optional[bytes] = ..., tx_hash: _Optional[bytes] = ..., capture_amount: _Optional[int] = ..., refunded: _Optional[int] = ...) -> None: ...
|
|
414
|
+
|
|
415
|
+
class CatalogVersion(_message.Message):
|
|
416
|
+
__slots__ = ("rate_card_hash", "catalog")
|
|
417
|
+
RATE_CARD_HASH_FIELD_NUMBER: _ClassVar[int]
|
|
418
|
+
CATALOG_FIELD_NUMBER: _ClassVar[int]
|
|
419
|
+
rate_card_hash: bytes
|
|
420
|
+
catalog: bytes
|
|
421
|
+
def __init__(self, rate_card_hash: _Optional[bytes] = ..., catalog: _Optional[bytes] = ...) -> None: ...
|
|
422
|
+
|
|
423
|
+
class PricedUsage(_message.Message):
|
|
424
|
+
__slots__ = ("model", "rate_card_hash", "input_tokens", "cache_tokens", "output_tokens", "acceptance_run_id", "acceptance_control_generation", "acceptance_signature")
|
|
425
|
+
MODEL_FIELD_NUMBER: _ClassVar[int]
|
|
426
|
+
RATE_CARD_HASH_FIELD_NUMBER: _ClassVar[int]
|
|
427
|
+
INPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
428
|
+
CACHE_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
429
|
+
OUTPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
430
|
+
ACCEPTANCE_RUN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
431
|
+
ACCEPTANCE_CONTROL_GENERATION_FIELD_NUMBER: _ClassVar[int]
|
|
432
|
+
ACCEPTANCE_SIGNATURE_FIELD_NUMBER: _ClassVar[int]
|
|
433
|
+
model: str
|
|
434
|
+
rate_card_hash: bytes
|
|
435
|
+
input_tokens: int
|
|
436
|
+
cache_tokens: int
|
|
437
|
+
output_tokens: int
|
|
438
|
+
acceptance_run_id: bytes
|
|
439
|
+
acceptance_control_generation: int
|
|
440
|
+
acceptance_signature: bytes
|
|
441
|
+
def __init__(self, model: _Optional[str] = ..., rate_card_hash: _Optional[bytes] = ..., input_tokens: _Optional[int] = ..., cache_tokens: _Optional[int] = ..., output_tokens: _Optional[int] = ..., acceptance_run_id: _Optional[bytes] = ..., acceptance_control_generation: _Optional[int] = ..., acceptance_signature: _Optional[bytes] = ...) -> None: ...
|
|
442
|
+
|
|
443
|
+
class RunState(_message.Message):
|
|
444
|
+
__slots__ = ("run_id", "model", "rate_card_hash", "control_generation", "auth_signature", "status", "input_tokens", "cache_tokens", "output_tokens")
|
|
445
|
+
RUN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
446
|
+
MODEL_FIELD_NUMBER: _ClassVar[int]
|
|
447
|
+
RATE_CARD_HASH_FIELD_NUMBER: _ClassVar[int]
|
|
448
|
+
CONTROL_GENERATION_FIELD_NUMBER: _ClassVar[int]
|
|
449
|
+
AUTH_SIGNATURE_FIELD_NUMBER: _ClassVar[int]
|
|
450
|
+
STATUS_FIELD_NUMBER: _ClassVar[int]
|
|
451
|
+
INPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
452
|
+
CACHE_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
453
|
+
OUTPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
454
|
+
run_id: bytes
|
|
455
|
+
model: str
|
|
456
|
+
rate_card_hash: bytes
|
|
457
|
+
control_generation: int
|
|
458
|
+
auth_signature: bytes
|
|
459
|
+
status: RunStatus
|
|
460
|
+
input_tokens: int
|
|
461
|
+
cache_tokens: int
|
|
462
|
+
output_tokens: int
|
|
463
|
+
def __init__(self, run_id: _Optional[bytes] = ..., model: _Optional[str] = ..., rate_card_hash: _Optional[bytes] = ..., control_generation: _Optional[int] = ..., auth_signature: _Optional[bytes] = ..., status: _Optional[_Union[RunStatus, str]] = ..., input_tokens: _Optional[int] = ..., cache_tokens: _Optional[int] = ..., output_tokens: _Optional[int] = ...) -> None: ...
|
|
464
|
+
|
|
465
|
+
class ChainObservation(_message.Message):
|
|
466
|
+
__slots__ = ("chain_id", "contract_address", "block_number", "block_hash")
|
|
467
|
+
CHAIN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
468
|
+
CONTRACT_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
|
469
|
+
BLOCK_NUMBER_FIELD_NUMBER: _ClassVar[int]
|
|
470
|
+
BLOCK_HASH_FIELD_NUMBER: _ClassVar[int]
|
|
471
|
+
chain_id: int
|
|
472
|
+
contract_address: bytes
|
|
473
|
+
block_number: int
|
|
474
|
+
block_hash: bytes
|
|
475
|
+
def __init__(self, chain_id: _Optional[int] = ..., contract_address: _Optional[bytes] = ..., block_number: _Optional[int] = ..., block_hash: _Optional[bytes] = ...) -> None: ...
|
|
476
|
+
|
|
477
|
+
class ConfirmedSettlementRef(_message.Message):
|
|
478
|
+
__slots__ = ("observation", "tx_hash", "session_id", "settled_cumulative", "delta")
|
|
479
|
+
OBSERVATION_FIELD_NUMBER: _ClassVar[int]
|
|
480
|
+
TX_HASH_FIELD_NUMBER: _ClassVar[int]
|
|
481
|
+
SESSION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
482
|
+
SETTLED_CUMULATIVE_FIELD_NUMBER: _ClassVar[int]
|
|
483
|
+
DELTA_FIELD_NUMBER: _ClassVar[int]
|
|
484
|
+
observation: ChainObservation
|
|
485
|
+
tx_hash: bytes
|
|
486
|
+
session_id: bytes
|
|
487
|
+
settled_cumulative: int
|
|
488
|
+
delta: int
|
|
489
|
+
def __init__(self, observation: _Optional[_Union[ChainObservation, _Mapping]] = ..., tx_hash: _Optional[bytes] = ..., session_id: _Optional[bytes] = ..., settled_cumulative: _Optional[int] = ..., delta: _Optional[int] = ...) -> None: ...
|
|
490
|
+
|
|
491
|
+
class UpstreamError(_message.Message):
|
|
492
|
+
__slots__ = ("http_status", "body")
|
|
493
|
+
HTTP_STATUS_FIELD_NUMBER: _ClassVar[int]
|
|
494
|
+
BODY_FIELD_NUMBER: _ClassVar[int]
|
|
495
|
+
http_status: int
|
|
496
|
+
body: bytes
|
|
497
|
+
def __init__(self, http_status: _Optional[int] = ..., body: _Optional[bytes] = ...) -> None: ...
|
|
498
|
+
|
|
499
|
+
class PaymentError(_message.Message):
|
|
500
|
+
__slots__ = ("code", "session_id", "run_id", "reason", "requested_rate_card_hash", "current_rate_card_hash", "pause_level")
|
|
501
|
+
CODE_FIELD_NUMBER: _ClassVar[int]
|
|
502
|
+
SESSION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
503
|
+
RUN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
504
|
+
REASON_FIELD_NUMBER: _ClassVar[int]
|
|
505
|
+
REQUESTED_RATE_CARD_HASH_FIELD_NUMBER: _ClassVar[int]
|
|
506
|
+
CURRENT_RATE_CARD_HASH_FIELD_NUMBER: _ClassVar[int]
|
|
507
|
+
PAUSE_LEVEL_FIELD_NUMBER: _ClassVar[int]
|
|
508
|
+
code: PaymentErrorCode
|
|
509
|
+
session_id: bytes
|
|
510
|
+
run_id: bytes
|
|
511
|
+
reason: str
|
|
512
|
+
requested_rate_card_hash: bytes
|
|
513
|
+
current_rate_card_hash: bytes
|
|
514
|
+
pause_level: PauseLevel
|
|
515
|
+
def __init__(self, code: _Optional[_Union[PaymentErrorCode, str]] = ..., session_id: _Optional[bytes] = ..., run_id: _Optional[bytes] = ..., reason: _Optional[str] = ..., requested_rate_card_hash: _Optional[bytes] = ..., current_rate_card_hash: _Optional[bytes] = ..., pause_level: _Optional[_Union[PauseLevel, str]] = ...) -> None: ...
|