completion() for together (#324)

* completion() for together

* test fixes

* fix client building
This commit is contained in:
Dinesh Yeduguru 2024-10-25 14:21:12 -07:00 committed by GitHub
parent 8a74e400d6
commit 7ec79f3b9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 86 additions and 34 deletions

View file

@ -138,11 +138,12 @@ async def test_completion(inference_settings):
"meta-reference",
"remote::ollama",
"remote::tgi",
"remote::together",
):
pytest.skip("Other inference providers don't support completion() yet")
response = await inference_impl.completion(
content="Roses are red,",
content="Micheael Jordan is born in ",
stream=False,
model=params["model"],
sampling_params=SamplingParams(
@ -151,7 +152,7 @@ async def test_completion(inference_settings):
)
assert isinstance(response, CompletionResponse)
assert "violets are blue" in response.content
assert "1963" in response.content
chunks = [
r
@ -180,6 +181,7 @@ async def test_completions_structured_output(inference_settings):
if provider.__provider_spec__.provider_type not in (
"meta-reference",
"remote::tgi",
"remote::together",
):
pytest.skip(
"Other inference providers don't support structured output in completions yet"