# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: matrix/app_server/llm/openai.proto
# Protobuf Python Version: 5.29.0
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import runtime_version as _runtime_version
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_runtime_version.ValidateProtobufRuntimeVersion(
    _runtime_version.Domain.PUBLIC,
    5,
    29,
    0,
    '',
    'matrix/app_server/llm/openai.proto'
)
# @@protoc_insertion_point(imports)

_sym_db = _symbol_database.Default()


from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2


DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"matrix/app_server/llm/openai.proto\x12\x15matrix.app_server.llm\x1a\x1cgoogle/protobuf/struct.proto\"F\n\x15\x43hatCompletionLogProb\x12\r\n\x05token\x18\x01 \x01(\t\x12\x0f\n\x07logprob\x18\x02 \x01(\x02\x12\r\n\x05\x62ytes\x18\x03 \x03(\x05\"\x92\x01\n\x1d\x43hatCompletionLogProbsContent\x12\r\n\x05token\x18\x01 \x01(\t\x12\x0f\n\x07logprob\x18\x02 \x01(\x02\x12\r\n\x05\x62ytes\x18\x03 \x03(\x05\x12\x42\n\x0ctop_logprobs\x18\x04 \x03(\x0b\x32,.matrix.app_server.llm.ChatCompletionLogProb\"_\n\x16\x43hatCompletionLogProbs\x12\x45\n\x07\x63ontent\x18\x01 \x03(\x0b\x32\x34.matrix.app_server.llm.ChatCompletionLogProbsContent\"Q\n\x12\x43ompletionLogProbs\x12\x13\n\x0btext_offset\x18\x01 \x03(\x05\x12\x16\n\x0etoken_logprobs\x18\x02 \x03(\x02\x12\x0e\n\x06tokens\x18\x03 \x03(\t\"O\n\x05Usage\x12\x15\n\rprompt_tokens\x18\x01 \x01(\x05\x12\x19\n\x11\x63ompletion_tokens\x18\x02 \x01(\x05\x12\x14\n\x0ctotal_tokens\x18\x03 \x01(\x05\"/\n\x0c\x46unctionCall\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\targuments\x18\x02 \x01(\t\"[\n\x08ToolCall\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x35\n\x08\x66unction\x18\x03 \x01(\x0b\x32#.matrix.app_server.llm.FunctionCall\"\xe5\x01\n\x11\x43ompletionMessage\x12\x0c\n\x04role\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x0f\n\x07refusal\x18\x03 \x01(\t\x12:\n\rfunction_call\x18\x04 \x03(\x0b\x32#.matrix.app_server.llm.FunctionCall\x12\x33\n\ntool_calls\x18\x05 \x03(\x0b\x32\x1f.matrix.app_server.llm.ToolCall\x12\x19\n\x11reasoning_content\x18\x06 \x01(\t\x12\x14\n\x0ctool_call_id\x18\x07 \x01(\t\"\xd5\x01\n\x1c\x43hatCompletionResponseChoice\x12\r\n\x05index\x18\x01 \x01(\x03\x12\x39\n\x07message\x18\x02 \x01(\x0b\x32(.matrix.app_server.llm.CompletionMessage\x12?\n\x08logprobs\x18\x03 \x01(\x0b\x32-.matrix.app_server.llm.ChatCompletionLogProbs\x12\x15\n\rfinish_reason\x18\x04 \x01(\t\x12\x13\n\x0bstop_reason\x18\x05 \x01(\t\"\xdf\x01\n\x18\x43ompletionResponseChoice\x12\r\n\x05index\x18\x01 \x01(\x03\x12\x0c\n\x04text\x18\x02 \x01(\t\x12;\n\x08logprobs\x18\x03 \x01(\x0b\x32).matrix.app_server.llm.CompletionLogProbs\x12\x15\n\rfinish_reason\x18\x04 \x01(\t\x12\x13\n\x0bstop_reason\x18\x05 \x01(\t\x12=\n\x0fprompt_logprobs\x18\x06 \x03(\x0b\x32$.matrix.app_server.llm.TokenLogProbs\"A\n\tTokenInfo\x12\x0f\n\x07logprob\x18\x01 \x01(\x02\x12\x0c\n\x04rank\x18\x02 \x01(\x05\x12\x15\n\rdecoded_token\x18\x03 \x01(\t\"\xa9\x01\n\rTokenLogProbs\x12\x45\n\ttoken_map\x18\x01 \x03(\x0b\x32\x32.matrix.app_server.llm.TokenLogProbs.TokenMapEntry\x1aQ\n\rTokenMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12/\n\x05value\x18\x02 \x01(\x0b\x32 .matrix.app_server.llm.TokenInfo:\x02\x38\x01\"e\n\x18\x43hatCompletionToolsParam\x12\x0c\n\x04type\x18\x01 \x01(\t\x12;\n\x08\x66unction\x18\x02 \x01(\x0b\x32).matrix.app_server.llm.FunctionDefinition\"d\n\x12\x46unctionDefinition\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12+\n\nparameters\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xee\x03\n\x15\x43hatCompletionRequest\x12\r\n\x05model\x18\x01 \x01(\t\x12:\n\x08messages\x18\x02 \x03(\x0b\x32(.matrix.app_server.llm.CompletionMessage\x12\x13\n\x0btemperature\x18\x03 \x01(\x02\x12\r\n\x05top_p\x18\x04 \x01(\x02\x12\t\n\x01n\x18\x05 \x01(\x05\x12\x10\n\x08logprobs\x18\x06 \x01(\x08\x12\x0c\n\x04stop\x18\x07 \x01(\t\x12\x12\n\nmax_tokens\x18\x08 \x01(\x05\x12\x18\n\x10presence_penalty\x18\t \x01(\x02\x12\x19\n\x11\x66requency_penalty\x18\n \x01(\x02\x12O\n\nlogit_bias\x18\x0b \x03(\x0b\x32;.matrix.app_server.llm.ChatCompletionRequest.LogitBiasEntry\x12\x0c\n\x04user\x18\x0c \x01(\t\x12\x0c\n\x04seed\x18\r \x01(\x05\x12>\n\x05tools\x18\x0e \x03(\x0b\x32/.matrix.app_server.llm.ChatCompletionToolsParam\x12\x13\n\x0btool_choice\x18\x0f \x01(\t\x1a\x30\n\x0eLogitBiasEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\"\xfe\x02\n\x11\x43ompletionRequest\x12\r\n\x05model\x18\x01 \x01(\t\x12\x0e\n\x06prompt\x18\x02 \x01(\t\x12\x13\n\x0btemperature\x18\x03 \x01(\x02\x12\r\n\x05top_p\x18\x04 \x01(\x02\x12\t\n\x01n\x18\x05 \x01(\x05\x12\x10\n\x08logprobs\x18\x06 \x01(\x08\x12\x0c\n\x04stop\x18\x07 \x01(\t\x12\x12\n\nmax_tokens\x18\x08 \x01(\x05\x12\x18\n\x10presence_penalty\x18\t \x01(\x02\x12\x19\n\x11\x66requency_penalty\x18\n \x01(\x02\x12K\n\nlogit_bias\x18\x0b \x03(\x0b\x32\x37.matrix.app_server.llm.CompletionRequest.LogitBiasEntry\x12\x0c\n\x04user\x18\x0c \x01(\t\x12\x0c\n\x04seed\x18\r \x01(\x05\x12\x17\n\x0fprompt_logprobs\x18\x0e \x01(\x05\x1a\x30\n\x0eLogitBiasEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\"\xc7\x01\n\x16\x43hatCompletionResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06object\x18\x02 \x01(\t\x12\x0f\n\x07\x63reated\x18\x03 \x01(\x03\x12\r\n\x05model\x18\x04 \x01(\t\x12\x44\n\x07\x63hoices\x18\x05 \x03(\x0b\x32\x33.matrix.app_server.llm.ChatCompletionResponseChoice\x12+\n\x05usage\x18\x06 \x01(\x0b\x32\x1c.matrix.app_server.llm.Usage\"\xbf\x01\n\x12\x43ompletionResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06object\x18\x02 \x01(\t\x12\x0f\n\x07\x63reated\x18\x03 \x01(\x03\x12\r\n\x05model\x18\x04 \x01(\t\x12@\n\x07\x63hoices\x18\x05 \x03(\x0b\x32/.matrix.app_server.llm.CompletionResponseChoice\x12+\n\x05usage\x18\x06 \x01(\x0b\x32\x1c.matrix.app_server.llm.Usage2\xf1\x01\n\rOpenaiService\x12u\n\x14\x43reateChatCompletion\x12,.matrix.app_server.llm.ChatCompletionRequest\x1a-.matrix.app_server.llm.ChatCompletionResponse\"\x00\x12i\n\x10\x43reateCompletion\x12(.matrix.app_server.llm.CompletionRequest\x1a).matrix.app_server.llm.CompletionResponse\"\x00\x42\nB\x06globalP\x01\x62\x06proto3')

_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'matrix.app_server.llm.openai_pb2', _globals)
if not _descriptor._USE_C_DESCRIPTORS:
  _globals['DESCRIPTOR']._loaded_options = None
  _globals['DESCRIPTOR']._serialized_options = b'B\006globalP\001'
  _globals['_TOKENLOGPROBS_TOKENMAPENTRY']._loaded_options = None
  _globals['_TOKENLOGPROBS_TOKENMAPENTRY']._serialized_options = b'8\001'
  _globals['_CHATCOMPLETIONREQUEST_LOGITBIASENTRY']._loaded_options = None
  _globals['_CHATCOMPLETIONREQUEST_LOGITBIASENTRY']._serialized_options = b'8\001'
  _globals['_COMPLETIONREQUEST_LOGITBIASENTRY']._loaded_options = None
  _globals['_COMPLETIONREQUEST_LOGITBIASENTRY']._serialized_options = b'8\001'
  _globals['_CHATCOMPLETIONLOGPROB']._serialized_start=91
  _globals['_CHATCOMPLETIONLOGPROB']._serialized_end=161
  _globals['_CHATCOMPLETIONLOGPROBSCONTENT']._serialized_start=164
  _globals['_CHATCOMPLETIONLOGPROBSCONTENT']._serialized_end=310
  _globals['_CHATCOMPLETIONLOGPROBS']._serialized_start=312
  _globals['_CHATCOMPLETIONLOGPROBS']._serialized_end=407
  _globals['_COMPLETIONLOGPROBS']._serialized_start=409
  _globals['_COMPLETIONLOGPROBS']._serialized_end=490
  _globals['_USAGE']._serialized_start=492
  _globals['_USAGE']._serialized_end=571
  _globals['_FUNCTIONCALL']._serialized_start=573
  _globals['_FUNCTIONCALL']._serialized_end=620
  _globals['_TOOLCALL']._serialized_start=622
  _globals['_TOOLCALL']._serialized_end=713
  _globals['_COMPLETIONMESSAGE']._serialized_start=716
  _globals['_COMPLETIONMESSAGE']._serialized_end=945
  _globals['_CHATCOMPLETIONRESPONSECHOICE']._serialized_start=948
  _globals['_CHATCOMPLETIONRESPONSECHOICE']._serialized_end=1161
  _globals['_COMPLETIONRESPONSECHOICE']._serialized_start=1164
  _globals['_COMPLETIONRESPONSECHOICE']._serialized_end=1387
  _globals['_TOKENINFO']._serialized_start=1389
  _globals['_TOKENINFO']._serialized_end=1454
  _globals['_TOKENLOGPROBS']._serialized_start=1457
  _globals['_TOKENLOGPROBS']._serialized_end=1626
  _globals['_TOKENLOGPROBS_TOKENMAPENTRY']._serialized_start=1545
  _globals['_TOKENLOGPROBS_TOKENMAPENTRY']._serialized_end=1626
  _globals['_CHATCOMPLETIONTOOLSPARAM']._serialized_start=1628
  _globals['_CHATCOMPLETIONTOOLSPARAM']._serialized_end=1729
  _globals['_FUNCTIONDEFINITION']._serialized_start=1731
  _globals['_FUNCTIONDEFINITION']._serialized_end=1831
  _globals['_CHATCOMPLETIONREQUEST']._serialized_start=1834
  _globals['_CHATCOMPLETIONREQUEST']._serialized_end=2328
  _globals['_CHATCOMPLETIONREQUEST_LOGITBIASENTRY']._serialized_start=2280
  _globals['_CHATCOMPLETIONREQUEST_LOGITBIASENTRY']._serialized_end=2328
  _globals['_COMPLETIONREQUEST']._serialized_start=2331
  _globals['_COMPLETIONREQUEST']._serialized_end=2713
  _globals['_COMPLETIONREQUEST_LOGITBIASENTRY']._serialized_start=2280
  _globals['_COMPLETIONREQUEST_LOGITBIASENTRY']._serialized_end=2328
  _globals['_CHATCOMPLETIONRESPONSE']._serialized_start=2716
  _globals['_CHATCOMPLETIONRESPONSE']._serialized_end=2915
  _globals['_COMPLETIONRESPONSE']._serialized_start=2918
  _globals['_COMPLETIONRESPONSE']._serialized_end=3109
  _globals['_OPENAISERVICE']._serialized_start=3112
  _globals['_OPENAISERVICE']._serialized_end=3353
# @@protoc_insertion_point(module_scope)
