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:
Ben Browning 2025-04-10 15:29:32 -04:00
parent ffae192540
commit 31181c070b
2 changed files with 112 additions and 2 deletions

View file

@ -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)