Skip to content

Commit 5eec0b9

Browse files
committed
Clean up notebooks
1 parent beeab01 commit 5eec0b9

6 files changed

+184
-161
lines changed

guidance/llms/_openai.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def __init__(self, model=None, caching=True, max_retries=5, max_calls_per_min=60
108108
self._tokenizer = tiktoken.get_encoding("cl100k_base")
109109
self.chat_mode = chat_mode
110110

111-
self.model = model
111+
self.model_name = model
112112
self.caching = caching
113113
self.max_retries = max_retries
114114
self.max_calls_per_min = max_calls_per_min
@@ -169,7 +169,7 @@ def __call__(self, prompt, stop=None, stop_regex=None, temperature=None, n=1, ma
169169
try:
170170
self.add_call()
171171
call_args = {
172-
"model": self.model,
172+
"model": self.model_name,
173173
"prompt": prompt,
174174
"max_tokens": max_tokens,
175175
"temperature": temperature,

notebooks/anachronism.ipynb

+8
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,14 @@
165165
"print('Few-shot', (np.array(labels) == fews).mean())\n",
166166
"print('Structured output', (np.array(labels) == structs).mean())"
167167
]
168+
},
169+
{
170+
"cell_type": "markdown",
171+
"metadata": {},
172+
"source": [
173+
"<hr style=\"height: 1px; opacity: 0.5; border: none; background: #cccccc;\">\n",
174+
"<div style=\"text-align: center; opacity: 0.5\">Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!</div>"
175+
]
168176
}
169177
],
170178
"metadata": {

0 commit comments

Comments
 (0)