Add docstrings for _threads#127
Conversation
| :param labels: a set of labels for the thread. | ||
| :param ttl_days: time-to-live in days for the thread. | ||
| :param expiration_policy: expiration policy for the file. | ||
| Assepts for passing ``static`` or ``since_last_active`` `strings <https://yandex.cloud/docs/foundation-models/threads/api-ref/Message/create#yandex.cloud.ai.common.ExpirationConfig>`_. Should be defined if ``ttl_days`` has been defined, otherwise both parameters should be undefined. |
There was a problem hiding this comment.
Я уже отмечал, что ссылки на прото не приветствуются)
Но мне еще кажется, что эта ссылка тут в принципе не нужна - все уже сказано.
|
|
||
|
|
||
| class BaseThreads(BaseDomain, Generic[ThreadTypeT]): | ||
| """A class for managing threads in a specific domain. |
There was a problem hiding this comment.
managing threads in a specific domain
Что-то не то, получается.
Threads - это "домен" с т.з. SDK, потому что доступ к ним осуществляется через sdk.threads, сами треды ни о каких доменах ничего не знают
|
|
||
|
|
||
| class BaseThreads(BaseDomain, Generic[ThreadTypeT]): | ||
| """A class for managing threads in a specific domain. |
There was a problem hiding this comment.
Также, как всегда, стоит упомянуть, что это часть Assistants API
| """A class for managing threads in a specific domain. | ||
|
|
||
| This class provides methods to create, retrieve, and list threads. It acts as a foundation for | ||
| thread implementations and requires a specific thread type to be defined. |
There was a problem hiding this comment.
It acts as a foundation for thread implementations and requires a specific thread type to be defined.
Я до конца не понял, что именно ты хотела тут донести, но тут явно что-то не то.
| ) -> ThreadTypeT: | ||
| """Retrieve a thread by its id. | ||
|
|
||
| This method fetches a thread using its unique identifier. |
There was a problem hiding this comment.
fetches already created thread?
| class BaseThread(ExpirableResource): | ||
| """A class for a thread resource. | ||
|
|
||
| It provides methods for updating, deleting, writing to, and reading from a thread. |
There was a problem hiding this comment.
Я бы хотел где-нибудь увидеть слово Message, потому что именно их содержит тред
|
|
||
| This method allows sending a message to the thread with optional labels. | ||
|
|
||
| :param message: the message to be sent to the thread. |
There was a problem hiding this comment.
Немного побольше нужно про MessageType, что там не только строчку можно передать, но и другие типы данных, смотрите какие: ...
Мне кажется, такое уже писали в районе Комплишенсов
|
|
||
| @dataclasses.dataclass(frozen=True) | ||
| class RichThread(BaseThread): | ||
| """Rich representation of a thread with additional metadata. |
| labels: dict[str, str] | None | ||
|
|
||
|
|
||
| @doc_from(BaseThread) |
There was a problem hiding this comment.
И это удалить, вроде.
Тогда в этом месте, вроде, по наследованию прилетит документация.
Можешь проверить это место в сгенерированной доке? (заодно проверишь мою инструкцию по генерации доки)
| @@ -185,13 +243,14 @@ async def read( | |||
|
|
|||
| __aiter__ = read | |||
There was a problem hiding this comment.
Можешь проверить, если описать __aiter__ с помощью #: синтаксиса, что и как пролезет (и проелезет ли вообще) в документацию?
No description provided.