From 06ce9f424868c21aa26e864f516c9f237d63c495 Mon Sep 17 00:00:00 2001 From: Martin Reinhardt Date: Tue, 5 Dec 2023 10:20:24 +0100 Subject: [PATCH] Add missing documentation to completion response. --- aleph_alpha_client/completion.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/aleph_alpha_client/completion.py b/aleph_alpha_client/completion.py index ac48523..2757452 100644 --- a/aleph_alpha_client/completion.py +++ b/aleph_alpha_client/completion.py @@ -247,6 +247,19 @@ def _asdict(self) -> Mapping[str, Any]: @dataclass(frozen=True) class CompletionResponse: + """ + Describes a completion response + + Parameters: + model_version: + Model name and version (if any) of the used model for inference. + completions: + List of completions; may contain only one entry if no more are requested (see parameter n). + optimized_prompt: + Describes prompt after optimizations. This field is only returned if the flag + `disable_optimizations` flag is not set and the prompt has actually changed. + """ + model_version: str completions: Sequence[CompletionResult] optimized_prompt: Optional[Prompt] = None