mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-22 01:06:52 +08:00
Add Together.ai's OpenAI API-compatible inference endpoints (#1947)
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user