-
-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7cdf3a
commit 668fa2c
Showing
5 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
permissions: | ||
contents: write | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
- uses: actions/cache@v3 | ||
with: | ||
key: mkdocs-material-${{ env.cache_id }} | ||
path: .cache | ||
restore-keys: | | ||
mkdocs-material- | ||
- run: pip install mkdocs-material | ||
- run: mkdocs gh-deploy --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# CodeInterpreterAPI Documentation | ||
|
||
CodeInterpreterAPI is a Python-based API designed give LLM Agents access to python and execute code. It provides a session-based conversational chat interface and the agent framework with a tool for executing code in a secure and isolated environment. | ||
|
||
## Key Classes | ||
|
||
### CodeInterpreterSession | ||
|
||
This is the main class that manages a code execution session. It provides methods to start, stop, and check the status of the session. It also handles logging and file uploads for the session. | ||
|
||
#### Methods | ||
|
||
* `from_id(session_id: UUID, **kwargs) -> "CodeInterpreterSession"`: This class method creates a new session from a given UUID. | ||
* `start() -> SessionStatus`: This method starts the session. | ||
* `stop() -> SessionStatus`: This method stops the session. | ||
* `log(msg: str) -> None`: This method logs a message. | ||
|
||
### CodeBox | ||
|
||
This class represents the code execution environment. It provides methods to upload files, execute code, and check the status of the execution. For more information look into the codebox api documentation. | ||
|
||
## Usage | ||
|
||
To use this API, create a new `CodeInterpreterSession` and use the `start` method to start the session. You can then use the `generate_response_sync` method to generate an AI response and the `stop` method to stop the session. You can use the generate response method multiple times in a single session to have a conversation with the AI. | ||
|
||
## Contributing | ||
|
||
Contributions are welcome. Please make sure to write functional Python with full type hinting and only write needed and precise comments. | ||
|
||
(This file was half chatgpt generated and not complete - real docs coming soon!) | ||
TODO: Write real docs |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
site_name: CodeInterpreterAPI - Docs | ||
theme: | ||
name: material |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters