Skip to content

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
  • Loading branch information
jxnl committed Feb 5, 2024
1 parent c14f5a5 commit c373577
Show file tree
Hide file tree
Showing 6 changed files with 1,357 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/concepts/caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ def extract(data) -> UserDetail:
start = time.perf_counter() # (1)
model = extract("Extract jason is 25 years old")
print(f"Time taken: {time.perf_counter() - start}")
#> Time taken: 0.4529974169563502
#> Time taken: 0.4476582088973373

start = time.perf_counter()
model = extract("Extract jason is 25 years old") # (2)
print(f"Time taken: {time.perf_counter() - start}")
#> Time taken: 7.080379873514175e-07
#> Time taken: 2.7909409254789352e-06
```

1. Using `time.perf_counter()` to measure the time taken to run the function is better than using `time.time()` because it's more accurate and less susceptible to system clock changes.
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ async def print_iterable_results():
)
async for m in model:
print(m)
#> name='John Doe' age=30
#> name='Jane Doe' age=28
#> name='John Doe' age=45
#> name='Jane Doe' age=40


import asyncio
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/parallel.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ for fc in function_calls:
print(fc)
#> location='Toronto' units='metric'
#> location='Dallas' units='imperial'
#> query='who won the super bowl'
#> query='Super Bowl winner'
```

1. Set the mode to `PARALLEL_TOOLS` to enable parallel function calling.
Expand Down
Loading

0 comments on commit c373577

Please sign in to comment.