Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Merge remote-tracking branch 'origin/fix-signatures' into openai-integration

Jakub Novak33b8c14c15d4
diff --cc packages/js-sdk/src/sandbox/index.ts
index 1e0c79f3b,71d9a1cfd..0808f184b
--- a/packages/js-sdk/src/sandbox/index.ts
+++ b/packages/js-sdk/src/sandbox/index.ts
@@@ -440,29 -428,8 +435,28 @@@ export class Sandbox extends SandboxCon
return `${protocol}://${hostname}${FILE_ROUTE}`
}
+ /**
+ * Returns a map of added actions.
+ *
+ * @returns Map of added actions
+ */
+ get actions() {
+ return new Map(this._actions)
+ }
+
+ /**
+ * OpenAI integration that can be used to get output for the actions added in the sandbox.
+ *
+ * @returns OpenAI integration
+ */
+ get openai() {
+ return {
+ actions: new Actions(this),
+ } as const
+ }
+
/**
- * Creates a new Sandbox.
- * @param optsOrID Sandbox options or Sandbox ID
+ * Creates a new Sandbox from the default `base` sandbox template.
* @returns New Sandbox
*
* @example