Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/api/llms.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ client.create_llm_model_endpoint(

# Wait for the endpoint to be ready

output = client.completions_sync(endpoint_name, prompts=["What is Deep Learning?"], max_new_tokens=10, temperature=0)
output = client.completions_sync(endpoint_name, prompt="What is Deep Learning?", max_new_tokens=10, temperature=0)
print(output)
```
20 changes: 0 additions & 20 deletions launch/api_client/model/completion_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ class MetaOapg:
class properties:
num_completion_tokens = schemas.IntSchema
text = schemas.StrSchema
num_prompt_tokens = schemas.IntSchema
__annotations__ = {
"num_completion_tokens": num_completion_tokens,
"text": text,
"num_prompt_tokens": num_prompt_tokens,
}

num_completion_tokens: MetaOapg.properties.num_completion_tokens
Expand All @@ -59,12 +57,6 @@ def __getitem__(
def __getitem__(self, name: typing_extensions.Literal["text"]) -> MetaOapg.properties.text:
...

@typing.overload
def __getitem__(
self, name: typing_extensions.Literal["num_prompt_tokens"]
) -> MetaOapg.properties.num_prompt_tokens:
...

@typing.overload
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema:
...
Expand All @@ -75,7 +67,6 @@ def __getitem__(
typing_extensions.Literal[
"num_completion_tokens",
"text",
"num_prompt_tokens",
],
str,
],
Expand All @@ -93,12 +84,6 @@ def get_item_oapg(
def get_item_oapg(self, name: typing_extensions.Literal["text"]) -> MetaOapg.properties.text:
...

@typing.overload
def get_item_oapg(
self, name: typing_extensions.Literal["num_prompt_tokens"]
) -> typing.Union[MetaOapg.properties.num_prompt_tokens, schemas.Unset]:
...

@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]:
...
Expand All @@ -109,7 +94,6 @@ def get_item_oapg(
typing_extensions.Literal[
"num_completion_tokens",
"text",
"num_prompt_tokens",
],
str,
],
Expand All @@ -131,9 +115,6 @@ def __new__(
MetaOapg.properties.text,
str,
],
num_prompt_tokens: typing.Union[
MetaOapg.properties.num_prompt_tokens, decimal.Decimal, int, schemas.Unset
] = schemas.unset,
_configuration: typing.Optional[schemas.Configuration] = None,
**kwargs: typing.Union[
schemas.AnyTypeSchema,
Expand All @@ -157,7 +138,6 @@ def __new__(
*_args,
num_completion_tokens=num_completion_tokens,
text=text,
num_prompt_tokens=num_prompt_tokens,
_configuration=_configuration,
**kwargs,
)
16 changes: 0 additions & 16 deletions launch/api_client/model/completion_output.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ class CompletionOutput(schemas.DictSchema):
class properties:
num_completion_tokens = schemas.IntSchema
text = schemas.StrSchema
num_prompt_tokens = schemas.IntSchema
__annotations__ = {
"num_completion_tokens": num_completion_tokens,
"text": text,
"num_prompt_tokens": num_prompt_tokens,
}
num_completion_tokens: MetaOapg.properties.num_completion_tokens
text: MetaOapg.properties.text
Expand All @@ -53,18 +51,13 @@ class CompletionOutput(schemas.DictSchema):
@typing.overload
def __getitem__(self, name: typing_extensions.Literal["text"]) -> MetaOapg.properties.text: ...
@typing.overload
def __getitem__(
self, name: typing_extensions.Literal["num_prompt_tokens"]
) -> MetaOapg.properties.num_prompt_tokens: ...
@typing.overload
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(
self,
name: typing.Union[
typing_extensions.Literal[
"num_completion_tokens",
"text",
"num_prompt_tokens",
],
str,
],
Expand All @@ -78,18 +71,13 @@ class CompletionOutput(schemas.DictSchema):
@typing.overload
def get_item_oapg(self, name: typing_extensions.Literal["text"]) -> MetaOapg.properties.text: ...
@typing.overload
def get_item_oapg(
self, name: typing_extensions.Literal["num_prompt_tokens"]
) -> typing.Union[MetaOapg.properties.num_prompt_tokens, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(
self,
name: typing.Union[
typing_extensions.Literal[
"num_completion_tokens",
"text",
"num_prompt_tokens",
],
str,
],
Expand All @@ -110,9 +98,6 @@ class CompletionOutput(schemas.DictSchema):
MetaOapg.properties.text,
str,
],
num_prompt_tokens: typing.Union[
MetaOapg.properties.num_prompt_tokens, decimal.Decimal, int, schemas.Unset
] = schemas.unset,
_configuration: typing.Optional[schemas.Configuration] = None,
**kwargs: typing.Union[
schemas.AnyTypeSchema,
Expand All @@ -136,7 +121,6 @@ class CompletionOutput(schemas.DictSchema):
*_args,
num_completion_tokens=num_completion_tokens,
text=text,
num_prompt_tokens=num_prompt_tokens,
_configuration=_configuration,
**kwargs,
)
20 changes: 0 additions & 20 deletions launch/api_client/model/completion_stream_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,10 @@ class properties:
finished = schemas.BoolSchema
text = schemas.StrSchema
num_completion_tokens = schemas.IntSchema
num_prompt_tokens = schemas.IntSchema
__annotations__ = {
"finished": finished,
"text": text,
"num_completion_tokens": num_completion_tokens,
"num_prompt_tokens": num_prompt_tokens,
}

finished: MetaOapg.properties.finished
Expand All @@ -65,12 +63,6 @@ def __getitem__(
) -> MetaOapg.properties.num_completion_tokens:
...

@typing.overload
def __getitem__(
self, name: typing_extensions.Literal["num_prompt_tokens"]
) -> MetaOapg.properties.num_prompt_tokens:
...

@typing.overload
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema:
...
Expand All @@ -82,7 +74,6 @@ def __getitem__(
"finished",
"text",
"num_completion_tokens",
"num_prompt_tokens",
],
str,
],
Expand All @@ -104,12 +95,6 @@ def get_item_oapg(
) -> typing.Union[MetaOapg.properties.num_completion_tokens, schemas.Unset]:
...

@typing.overload
def get_item_oapg(
self, name: typing_extensions.Literal["num_prompt_tokens"]
) -> typing.Union[MetaOapg.properties.num_prompt_tokens, schemas.Unset]:
...

@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]:
...
Expand All @@ -121,7 +106,6 @@ def get_item_oapg(
"finished",
"text",
"num_completion_tokens",
"num_prompt_tokens",
],
str,
],
Expand All @@ -145,9 +129,6 @@ def __new__(
num_completion_tokens: typing.Union[
MetaOapg.properties.num_completion_tokens, decimal.Decimal, int, schemas.Unset
] = schemas.unset,
num_prompt_tokens: typing.Union[
MetaOapg.properties.num_prompt_tokens, decimal.Decimal, int, schemas.Unset
] = schemas.unset,
_configuration: typing.Optional[schemas.Configuration] = None,
**kwargs: typing.Union[
schemas.AnyTypeSchema,
Expand All @@ -172,7 +153,6 @@ def __new__(
finished=finished,
text=text,
num_completion_tokens=num_completion_tokens,
num_prompt_tokens=num_prompt_tokens,
_configuration=_configuration,
**kwargs,
)
16 changes: 0 additions & 16 deletions launch/api_client/model/completion_stream_output.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,10 @@ class CompletionStreamOutput(schemas.DictSchema):
finished = schemas.BoolSchema
text = schemas.StrSchema
num_completion_tokens = schemas.IntSchema
num_prompt_tokens = schemas.IntSchema
__annotations__ = {
"finished": finished,
"text": text,
"num_completion_tokens": num_completion_tokens,
"num_prompt_tokens": num_prompt_tokens,
}
finished: MetaOapg.properties.finished
text: MetaOapg.properties.text
Expand All @@ -57,10 +55,6 @@ class CompletionStreamOutput(schemas.DictSchema):
self, name: typing_extensions.Literal["num_completion_tokens"]
) -> MetaOapg.properties.num_completion_tokens: ...
@typing.overload
def __getitem__(
self, name: typing_extensions.Literal["num_prompt_tokens"]
) -> MetaOapg.properties.num_prompt_tokens: ...
@typing.overload
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
def __getitem__(
self,
Expand All @@ -69,7 +63,6 @@ class CompletionStreamOutput(schemas.DictSchema):
"finished",
"text",
"num_completion_tokens",
"num_prompt_tokens",
],
str,
],
Expand All @@ -85,10 +78,6 @@ class CompletionStreamOutput(schemas.DictSchema):
self, name: typing_extensions.Literal["num_completion_tokens"]
) -> typing.Union[MetaOapg.properties.num_completion_tokens, schemas.Unset]: ...
@typing.overload
def get_item_oapg(
self, name: typing_extensions.Literal["num_prompt_tokens"]
) -> typing.Union[MetaOapg.properties.num_prompt_tokens, schemas.Unset]: ...
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
def get_item_oapg(
self,
Expand All @@ -97,7 +86,6 @@ class CompletionStreamOutput(schemas.DictSchema):
"finished",
"text",
"num_completion_tokens",
"num_prompt_tokens",
],
str,
],
Expand All @@ -120,9 +108,6 @@ class CompletionStreamOutput(schemas.DictSchema):
num_completion_tokens: typing.Union[
MetaOapg.properties.num_completion_tokens, decimal.Decimal, int, schemas.Unset
] = schemas.unset,
num_prompt_tokens: typing.Union[
MetaOapg.properties.num_prompt_tokens, decimal.Decimal, int, schemas.Unset
] = schemas.unset,
_configuration: typing.Optional[schemas.Configuration] = None,
**kwargs: typing.Union[
schemas.AnyTypeSchema,
Expand All @@ -147,7 +132,6 @@ class CompletionStreamOutput(schemas.DictSchema):
finished=finished,
text=text,
num_completion_tokens=num_completion_tokens,
num_prompt_tokens=num_prompt_tokens,
_configuration=_configuration,
**kwargs,
)
Loading