-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Docs] - Add info about teams to CLI docs (#418)
Add section about team in CLI
- Loading branch information
Showing
15 changed files
with
6,569 additions
and
8,354 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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
import { Footer } from '@/components/Footer' | ||
|
||
export default async function Layout({ children }) { | ||
return ( | ||
<div className="pt-12"> | ||
{children} | ||
<Footer /> | ||
</div> | ||
) | ||
} |
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
54 changes: 54 additions & 0 deletions
54
.../web/src/app/(docs)/docs/guide/beta-code-interpreter-language-runtimes/page.mdx
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,54 @@ | ||
# Code Interpreter SDK Beta - Language Runtimes | ||
|
||
This guide shows how to run AI-generated code in different language runtimes using the new Code Interpreter beta SDK. | ||
The following language runtimes are currently supported: | ||
- **Python** | ||
- **JavaScript** | ||
- **Java** | ||
- **Bash** | ||
- **R** | ||
|
||
<Note> | ||
Want more language runtimes? Reached out to us on [Discord](https://discord.gg/U7KEcGErtQ) or over [email](emailto:[email protected]). | ||
</Note> | ||
|
||
## 1. Install the Code Interpreter beta SDK | ||
The latest beta versions you should install can be found in NPM/PyPi release history: | ||
- **JavaScript & TypeScript** | ||
- [Latest release](https://www.npmjs.com/package/@e2b/code-interpreter?activeTab=versions) with *rc* tag for `@e2b/code-interpreter` | ||
- **Python** | ||
- [Latest release](https://pypi.org/project/e2b-code-interpreter/#history) with *PRE-RELEASE* for `e2b-code-interpreter` | ||
|
||
|
||
## 2. Active kernel for the desired language | ||
Each of the supported language runtimes has its own kernel. | ||
|
||
**Python** | ||
```python | ||
from e2b_code_interpreter import CodeInterpreter | ||
|
||
sandbox = CodeInterpreter() | ||
|
||
# 1. Set JS kernel - available kernel names: 'r', 'javascript', 'java', 'bash' | ||
js_id = sandbox.notebook.create_kernel(kernel_name="javascript") | ||
# 2. Run JS code inside code interpreter! | ||
execution = sandbox.notebook.exec_cell("console.log('Hello World!')", kernel_id=js_id) | ||
print(execution) | ||
# 3. Use Python again | ||
sandbox.notebook.exec_cell("print('Hello World!')") | ||
``` | ||
|
||
**JavaScript / TypeScript** | ||
```js | ||
import { CodeInterpreter } from '@e2b/code-interpreter' | ||
|
||
const sandbox = await CodeInterpreter.create() | ||
|
||
// 1. Set JS kernel - available kernel names: 'r', 'javascript', 'java', 'bash' | ||
const jsID = await sandbox.notebook.createKernel({ kernelName: 'javascript' }) | ||
// 2. Run JS code inside code interpreter! | ||
const execution = await sandbox.notebook.execCell("console.log('Hello World!')", { kernelID: jsID }) | ||
console.log(execution) | ||
// 3. Use Python again | ||
await sandbox.notebook.execCell('print("Hello World!")') | ||
``` |
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
This file was deleted.
Oops, something went wrong.
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
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
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.