Add Together.ai's OpenAI API-compatible inference endpoints (#1947)
This commit is contained in:
parent
de584807e1
commit
6075fee556
16 changed files with 307 additions and 101 deletions
|
|
@ -39,13 +39,15 @@ def test_invoke_model(setup_openai_mock):
|
|||
},
|
||||
texts=[
|
||||
"hello",
|
||||
"world"
|
||||
"world",
|
||||
" ".join(["long_text"] * 100),
|
||||
" ".join(["another_long_text"] * 100)
|
||||
],
|
||||
user="abc-123"
|
||||
)
|
||||
|
||||
assert isinstance(result, TextEmbeddingResult)
|
||||
assert len(result.embeddings) == 2
|
||||
assert len(result.embeddings) == 4
|
||||
assert result.usage.total_tokens == 2
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue