DSPy: The framework for programming—not prompting—language models
Python
update sglang site to new url (#1740)
arnavsinghvi119391c2a9b386
diff --git a/docs/docs/building-blocks/1-language_models.md b/docs/docs/building-blocks/1-language_models.mdindex 19560b851..41d90cfc9 100644--- a/docs/docs/building-blocks/1-language_models.md+++ b/docs/docs/building-blocks/1-language_models.md@@ -118,7 +118,7 @@ Any OpenAI-compatible endpoint is easy to set up with an `openai/` prefix as wel#### Setting up SGLang-1. **Install SGLang (adapted from SGLang [documentation](https://sglang.readthedocs.io/en/latest/install.html)):**+1. **Install SGLang (adapted from SGLang [documentation](https://sgl-project.github.io/starts/install.html)):**```bashpip install "sglang[all]"@@ -158,13 +158,16 @@ Any OpenAI-compatible endpoint is easy to set up with an `openai/` prefix as wel```pythonsglang_port = 7501sglang_url = f"http://localhost:{sglang_port}/v1"- sglang_llama = dspy.LM("openai/meta-llama/Meta-Llama-3-8B-Instruct", api_base=sglang_url)++ # To avoid potential errors from LiteLLM when querying the SGLang endpoint, you may need to set api_key = ""++ sglang_llama = dspy.LM("openai/meta-llama/Meta-Llama-3-8B-Instruct", api_base=sglang_url, api_key = "")# You could also use text mode, in which the prompts are *not* formatted as messages.- sglang_llama_text = dspy.LM("openai/meta-llama/Meta-Llama-3-8B-Instruct", api_base=sglang_url, model_type='text')+ sglang_llama_text = dspy.LM("openai/meta-llama/Meta-Llama-3-8B-Instruct", api_base=sglang_url, model_type='text', api_key = "")```- For further details on customizing the SGLang configuration, please refer to the [SGLang documentation](https://sglang.readthedocs.io/en/latest/backend.html#additional-server-arguments).+ For further details on customizing the SGLang configuration, please refer to the [SGLang documentation](https://sgl-project.github.io/backend/backend.html#additional-server-arguments).#Additionally, you can also host models locally through Ollama.