Skip to content

Commit 7ffa102

Browse files
committed
Updated docs and guides
1 parent d6c5c99 commit 7ffa102

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

docs/building-with-codegen/calling-out-to-llms.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,10 @@ method.edit(new_impl)
225225
```python
226226
codebase.set_session_options(max_ai_requests=200)
227227
```
228+
<
229+
Note>
230+
You can also use `codebase.set_session_options` to increase the execution time and the number of operations allowed in a session. This is useful for handling larger tasks or more complex operations that require additional resources. Adjust the `max_seconds` and `max_transactions` parameters to suit your needs:
231+
```python
232+
codebase.set_session_options(max_seconds=300, max_transactions=500)
233+
```
234+
</Note>

src/codegen/sdk/core/codebase.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,6 +1131,8 @@ def set_session_options(self, **kwargs: Unpack[SessionOptions]) -> None:
11311131
allowed in a session.
11321132
- max_seconds (int, optional): The maximum duration in seconds for a session
11331133
before it times out.
1134+
- max_ai_requests (int, optional): The maximum number of AI requests
1135+
allowed in a session.
11341136
"""
11351137
self.G.session_options = self.G.session_options.model_copy(update=kwargs)
11361138
self.G.transaction_manager.set_max_transactions(self.G.session_options.max_transactions)

0 commit comments

Comments
 (0)