Skip to content

Commit f0c2157

Browse files
committed
Merge branch 'main' of github.com:guidance-ai/guidance
2 parents 9d458bc + 212237e commit f0c2157

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ with assistant():
7272

7373
6. **Easy to write reusable components**
7474
```python
75+
import guidance
76+
7577
@guidance
7678
def one_line_thing(lm, thing, topic):
7779
lm += f'Here is a one-line {thing} about {topic}: ' + gen(stop='\n')
@@ -276,7 +278,7 @@ with assistant():
276278

277279
## Example notebooks
278280
We are working on updating our example notebooks. The following ones have been updated:
279-
- [Basic tutorial](notebooks/tutorial.ipynb)
281+
- [Basic tutorial](notebooks/tutorials/intro_to_guidance.ipynb)
280282
- [Chatbot with search](notebooks/chat_with_search.ipynb)
281283

282284
More coming soon

notebooks/tutorials/intro_to_guidance.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"cell_type": "markdown",
7474
"metadata": {},
7575
"source": [
76-
"Once you have added some text to the model you can then ask the model to generate unconstrained text using the `gen` guidance function. Guidance functions represent executable components that can be appended to a model. We you append a guidance function to a model the model extends its state by executing the guidance function."
76+
"Once you have added some text to the model you can then ask the model to generate unconstrained text using the `gen` guidance function. Guidance functions represent executable components that can be appended to a model. When you append a guidance function to a model the model extends its state by executing the guidance function."
7777
]
7878
},
7979
{
@@ -283,7 +283,7 @@
283283
"cell_type": "markdown",
284284
"metadata": {},
285285
"source": [
286-
"Note that one atypical feature of guidance functions is that multi-line string literals defined inside a guidance function respect the python indentation structure. This means that the whitespace before \"Q:\" and \"A:\" in the prompt above is stripped (but if they were indented 6 spaces instead of 4 spaces then only the first 4 spaces would be stripped, since that is the curent python indentation level). This allows us to define multi-line templates inside guidance functions while retaining indentation readability (if you ever want to disable this behavior you can use `@guidance(dedent=False)`)."
286+
"Note that one atypical feature of guidance functions is that multi-line string literals defined inside a guidance function respect the python indentation structure. This means that the whitespace before \"Q:\" and \"A:\" in the prompt above is stripped (but if they were indented 6 spaces instead of 4 spaces then only the first 4 spaces would be stripped, since that is the current python indentation level). This allows us to define multi-line templates inside guidance functions while retaining indentation readability (if you ever want to disable this behavior you can use `@guidance(dedent=False)`)."
287287
]
288288
},
289289
{

0 commit comments

Comments
 (0)