Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

docs: fix the order of the output section

Han Xiaoc368dbced694
diff --git a/docs/docs/building-blocks/1-language_models.md b/docs/docs/building-blocks/1-language_models.md
index cb03ce29b..93f4960a4 100644
--- a/docs/docs/building-blocks/1-language_models.md
+++ b/docs/docs/building-blocks/1-language_models.md
@@ -18,10 +18,6 @@ For example, to use OpenAI language models, you can do it as follows.
gpt3_turbo = dspy.OpenAI(model='gpt-3.5-turbo-1106', max_tokens=300)
dspy.configure(lm=gpt3_turbo)
```
-**Output:**
-```text
-['Hello! How can I assist you today?']
-```
## Directly calling the LM.
@@ -31,6 +27,11 @@ You can simply call the LM with a string to give it a raw prompt, i.e. a string.
gpt3_turbo("hello! this is a raw prompt to GPT-3.5")
```
+**Output:**
+```text
+['Hello! How can I assist you today?']
+```
+
This is almost never the recommended way to interact with LMs in DSPy, but it is allowed.
## Using the LM with DSPy signatures.
@@ -172,4 +173,4 @@ model = 'dist/prebuilt/mlc-chat-Llama-2-7b-chat-hf-q4f16_1'
model_path = 'dist/prebuilt/lib/Llama-2-7b-chat-hf-q4f16_1-cuda.so'
llama = dspy.ChatModuleClient(model=model, model_path=model_path)
-```
\ No newline at end of file
+```