Add docstrings for _models/completions#124
Conversation
|
|
||
| class BaseCompletions(BaseModelFunction[ModelTypeT]): | ||
| """ | ||
| A class for handling model completions. |
There was a problem hiding this comment.
completioins models, наверное
| model_version: str = 'latest', | ||
| ) -> ModelTypeT: | ||
| """ | ||
| Call the specified model to generate completions. |
There was a problem hiding this comment.
Не, это не вызов модели, а создание объекта модели для вызова
|
|
||
| :param model_type: the type of langchain model to initialize. | ||
| Defaults to "chat". | ||
| :param timeout: the timeout, or the maximum time to wait for the request to complete in seconds. |
There was a problem hiding this comment.
Тут немного другой таймаут.
Он задает дефолт для объекта модели лангчейна.
| """ | ||
| Configures the model with specified parameters. | ||
|
|
||
| :param temperature: a sampling temperature to use - higher values mean more random results. |
There was a problem hiding this comment.
И тут про область значений ничего не сказано.
ЕМНИП она лежит в [0;1]
| """ | ||
| Executes the model with the provided messages. | ||
|
|
||
| :param messages: the input messages to process. |
There was a problem hiding this comment.
Надо бы слова добавить про то, какими бывают сообщения.
Их типы.
Там может быть строчка, словарик, объект результата, например, но там оч много подробностей
| ) -> AsyncIterator[GPTModelResult[AsyncToolCall]]: | ||
| """ | ||
| Executes the model with the provided messages | ||
| and yields results as they become available. |
There was a problem hiding this comment.
Тут нужно как-то перефразировать, не результаты, а partial results
| """ | ||
| A class representing detailed usage statistics for a completion request, | ||
| including reasoning tokens. | ||
| Inherits from :func:`.Usage` and includes additional information about reasoning tokens. |
There was a problem hiding this comment.
не :func:, а :class:, но нужно проверить, что реф будет работать
|
|
||
| @dataclass(frozen=True) | ||
| class Alternative(TextMessage, ProtoBased[ProtoAlternative], HaveToolCalls[ToolCallTypeT]): | ||
| """A class representing an alternative response, including its status and tool calls.""" |
There was a problem hiding this comment.
Мне не нравится, суть в не в том, что это альтернатива ответу, а в том, что это одна из альтернатив ответа.
Слово "альтернатива" вводит в заблуждение.
response: {alternative1, alternative2},
Причем сейчас у ответа всегда одна и только одна альтернатива.
| Executes the model with the provided messages. | ||
|
|
||
| :param messages: the input messages to process. Could be a string, a dictionary, or a result object. | ||
| Read more about other possible message types in the `documentation <https://yandex.cloud/docs/foundation-models/text-generation/api-ref/TextGeneration/completion#yandex.cloud.ai.foundation_models.v1.Message>`_. |
There was a problem hiding this comment.
Ссылка точно не та, прото точно никому не нужен.
Вот тут вот есть что-то приличное:
https://yandex.cloud/ru/docs/foundation-models/sdk/#usage
No description provided.