File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -227,21 +227,21 @@ For instance we can start from this decent function:
227
227
``` python
228
228
@gpt_function
229
229
def list_movies (actor , n = 2 ) -> list[str ]:
230
- """ Return the titles of at most {n} great movies featuring {actor}."""
231
-
232
- list_movies(" Leonardo DiCaprio " )
233
- # ['The Revenant ', 'Inception ']
230
+ """ Return {n} movies featuring {actor}, e.g. "Batman", "Up".. ."""
231
+
232
+ list_movies(" Brad Pitt " )
233
+ # ['Fight Club ', 'Once Upon a Time in Hollywood ']
234
234
```
235
235
236
- And now let's ask for a more specific list and a better (more expensive) GPT model:
236
+ Now let's ask for a more specific list, with a better (more expensive) GPT model:
237
237
238
238
``` python
239
239
list_movies(
240
- " Leonardo DiCaprio " ,
240
+ " Brad Pitt " ,
241
241
gpt_system_prompt = " Don't list movies released before 2020." ,
242
242
gpt_model = " gpt-4o-2024-08-06" # gpt-4o knows more than -mini
243
243
)
244
- # ['Django Unchained ', 'Once Upon a Time in Hollywood ']
244
+ # ['Bullet Train ', 'Babylon ']
245
245
```
246
246
247
247
### Asking the GPT for a reasoned answer
You can’t perform that action at this time.
0 commit comments