Skip to content

Commit

Permalink
📜 documentation setup
Browse files Browse the repository at this point in the history
  • Loading branch information
shroominic committed Sep 3, 2023
1 parent b7cdf3a commit 668fa2c
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
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
31 changes: 31 additions & 0 deletions docs/index.md
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 removed docs/write_docs.todo
Empty file.
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
site_name: CodeInterpreterAPI - Docs
theme:
name: material
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pydantic-settings = "^2"
streamlit = { version = "^1", optional = true }
jupyter-kernel-gateway = { version = "^2", optional = true }
Pillow = { version = "^9", optional = true }
mkdocs-material = "^9.2.7"

[tool.poetry.extras]
all = ["jupyter-kernel-gateway", "streamlit", "Pillow"]
Expand Down

0 comments on commit 668fa2c

Please sign in to comment.