main
 1# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 2
 3from typing import List, Optional
 4from typing_extensions import Literal
 5
 6from .._models import BaseModel
 7from .completion_usage import CompletionUsage
 8from .completion_choice import CompletionChoice
 9
10__all__ = ["Completion"]
11
12
13class Completion(BaseModel):
14    id: str
15    """A unique identifier for the completion."""
16
17    choices: List[CompletionChoice]
18    """The list of completion choices the model generated for the input prompt."""
19
20    created: int
21    """The Unix timestamp (in seconds) of when the completion was created."""
22
23    model: str
24    """The model used for completion."""
25
26    object: Literal["text_completion"]
27    """The object type, which is always "text_completion" """
28
29    system_fingerprint: Optional[str] = None
30    """This fingerprint represents the backend configuration that the model runs with.
31
32    Can be used in conjunction with the `seed` request parameter to understand when
33    backend changes have been made that might impact determinism.
34    """
35
36    usage: Optional[CompletionUsage] = None
37    """Usage statistics for the completion request."""