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
|
|
@ -46,14 +46,16 @@ def test_invoke_model():
|
|||
},
|
||||
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 result.usage.total_tokens == 2
|
||||
assert len(result.embeddings) == 4
|
||||
assert result.usage.total_tokens == 502
|
||||
|
||||
|
||||
def test_get_num_tokens():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue