mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-31 02:43:53 +00:00
Fireworks provider support for OpenAI API endpoints
This wires up the openai_completion and openai_chat_completion API methods for the remote Fireworks inference provider. Signed-off-by: Ben Browning <bbrownin@redhat.com>
This commit is contained in:
parent
ffae192540
commit
31181c070b
2 changed files with 112 additions and 2 deletions
|
|
@ -208,6 +208,9 @@ def test_openai_chat_completion_streaming(openai_client, client_with_models, tex
|
|||
stream=True,
|
||||
timeout=120, # Increase timeout to 2 minutes for large conversation history
|
||||
)
|
||||
streamed_content = [str(chunk.choices[0].delta.content.lower().strip()) for chunk in response]
|
||||
streamed_content = []
|
||||
for chunk in response:
|
||||
if chunk.choices[0].delta.content:
|
||||
streamed_content.append(chunk.choices[0].delta.content.lower().strip())
|
||||
assert len(streamed_content) > 0
|
||||
assert expected.lower() in "".join(streamed_content)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue