"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""
import builtins
import google.protobuf.descriptor
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import sys
import typing

if sys.version_info >= (3, 10):
    import typing as typing_extensions
else:
    import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

class _FinishReason:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _FinishReasonEnumTypeWrapper(
    google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_FinishReason.ValueType], builtins.type
):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    NULL: _FinishReason.ValueType  # 0
    """未结束"""
    STOP: _FinishReason.ValueType  # 1
    """生成结束"""
    LENGTH: _FinishReason.ValueType  # 2
    """生成长度达到最大值"""
    FUNCTION_CALL: _FinishReason.ValueType  # 3
    """需要调用函数"""
    CONTENT_FILTER: _FinishReason.ValueType  # 4
    """生成内容被过滤"""

class FinishReason(_FinishReason, metaclass=_FinishReasonEnumTypeWrapper):
    """OpenAI FinishReason"""

NULL: FinishReason.ValueType  # 0
"""未结束"""
STOP: FinishReason.ValueType  # 1
"""生成结束"""
LENGTH: FinishReason.ValueType  # 2
"""生成长度达到最大值"""
FUNCTION_CALL: FinishReason.ValueType  # 3
"""需要调用函数"""
CONTENT_FILTER: FinishReason.ValueType  # 4
"""生成内容被过滤"""
global___FinishReason = FinishReason

@typing_extensions.final
class GptResult(google.protobuf.message.Message):
    """GPT 响应"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    CONTENT_FIELD_NUMBER: builtins.int
    FINISH_REASON_FIELD_NUMBER: builtins.int
    content: builtins.str
    """生成内容"""
    finish_reason: global___FinishReason.ValueType
    """结束原因"""
    def __init__(
        self,
        *,
        content: builtins.str = ...,
        finish_reason: global___FinishReason.ValueType | None = ...,
    ) -> None: ...
    def HasField(
        self,
        field_name: typing_extensions.Literal["_finish_reason", b"_finish_reason", "finish_reason", b"finish_reason"],
    ) -> builtins.bool: ...
    def ClearField(
        self,
        field_name: typing_extensions.Literal[
            "_finish_reason", b"_finish_reason", "content", b"content", "finish_reason", b"finish_reason"
        ],
    ) -> None: ...
    def WhichOneof(
        self, oneof_group: typing_extensions.Literal["_finish_reason", b"_finish_reason"]
    ) -> typing_extensions.Literal["finish_reason"] | None: ...

global___GptResult = GptResult

@typing_extensions.final
class GptRequest(google.protobuf.message.Message):
    """GPT 请求"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    TEXT_FIELD_NUMBER: builtins.int
    ACTION_FIELD_NUMBER: builtins.int
    text: builtins.str
    """所选文本"""
    action: builtins.str
    """操作"""
    def __init__(
        self,
        *,
        text: builtins.str = ...,
        action: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["action", b"action", "text", b"text"]) -> None: ...

global___GptRequest = GptRequest
