Skip to content

Commit

Permalink
Fix incorrect code snippets and docs links (#583)
Browse files Browse the repository at this point in the history
This PR fixes incorrect code snippets and wrong link
  • Loading branch information
mlejva authored Feb 18, 2025
2 parents 26b2fe5 + 357be70 commit ff818fb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ You'll need to pass the `language` parameter with value `bash`.
import { Sandbox } from '@e2b/code-interpreter'

const sbx = await Sandbox.create()
const execution = await sbx.runCode('console.log("Hello, world!")', { language: 'bash' })
const execution = await sbx.runCode('echo "Hello, world!"', { language: 'bash' })
console.log(execution)
```
```python
from e2b_code_interpreter import Sandbox

sbx = Sandbox()
execution = sbx.run_code('console.log("Hello, world!")', { language: 'bash' })
execution = sbx.run_code("echo 'Hello, world!'", language="bash")
print(execution)
```
</CodeGroup>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ console.log(execution)
from e2b_code_interpreter import Sandbox

sbx = Sandbox()
execution = sbx.run_code('System.out.println("Hello, world!");', { language: 'java' })
execution = sbx.run_code('System.out.println("Hello, world!");', language="java")
print(execution)
```
</CodeGroup>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ console.log(execution)
from e2b_code_interpreter import Sandbox

sbx = Sandbox()
execution = sbx.run_code('console.log("Hello, world!")', { language: 'js' })
execution = sbx.run_code('console.log("Hello, world!")', language="js")
print(execution)
```
</CodeGroup>
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
Typically you use Python to run AI-generated code for data analysis but you can use other languages as well.

Out of the box E2B Sandbox supports:
- [Python](/docs/code-interpreting/analyze-data/supported-languages/python)
- [JavaScript](/docs/code-interpreting/analyze-data/supported-languages/javascript)
- [R](/docs/code-interpreting/analyze-data/supported-languages/r)
- [Java](/docs/code-interpreting/analyze-data/supported-languages/java)
- [Bash](/docs/code-interpreting/analyze-data/supported-languages/bash)
- [Python](/docs/code-interpreting/supported-languages/python)
- [JavaScript](/docs/code-interpreting/supported-languages/javascript)
- [R](/docs/code-interpreting/supported-languages/r)
- [Java](/docs/code-interpreting/supported-languages/java)
- [Bash](/docs/code-interpreting/supported-languages/bash)

<Note>
You can use any custom language runtime by creating a [custom sandbox template](/docs/sandbox-template).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ You'll need to pass the `language` parameter with value `r`.
import { Sandbox } from '@e2b/code-interpreter'

const sbx = await Sandbox.create()
const execution = await sbx.runCode('console.log("Hello, world!")', { language: 'r' })
const execution = await sbx.runCode('print("Hello, world!")', { language: 'r' })
console.log(execution)
```
```python
from e2b_code_interpreter import Sandbox

sbx = Sandbox()
execution = sbx.run_code('console.log("Hello, world!")', { language: 'r' })
execution = sbx.run_code('print("Hello, world!")', language="r")
print(execution)
```
</CodeGroup>

0 comments on commit ff818fb

Please sign in to comment.