diff --git a/docs/my-website/docs/providers/nscale.md b/docs/my-website/docs/providers/nscale.md index 5ebd948db6..670d92a517 100644 --- a/docs/my-website/docs/providers/nscale.md +++ b/docs/my-website/docs/providers/nscale.md @@ -67,6 +67,22 @@ response = completion( print(response) ``` +```python showLineNumbers title="Nscale Text Generation - Streaming" +from litellm import completion +import os + +os.environ["NSCALE_API_KEY"] = "" # your Nscale API key +stream = completion( + model="nscale/meta-llama/Llama-4-Scout-17B-16E-Instruct", + messages=[{"role": "user", "content": "What is LiteLLM?"}], + stream=True +) + +for chunk in stream: + if chunk.choices[0].delta.content is not None: + print(chunk.choices[0].delta.content, end="") +``` + ### Image Generation ```python showLineNumbers title="Nscale Image Generation" diff --git a/litellm/llms/nscale/chat/transformation.py b/litellm/llms/nscale/chat/transformation.py index 2f7619c13e..6103b8e3c4 100644 --- a/litellm/llms/nscale/chat/transformation.py +++ b/litellm/llms/nscale/chat/transformation.py @@ -41,4 +41,12 @@ class NscaleConfig(OpenAIGPTConfig): "n", "temperature", "top_p", + "stream", + "logprobs", + "top_logprobs", + "frequency_penalty", + "presence_penalty", + "response_format", + "stop", + "logit_bias", ]