Skip to content

Commit 8586675

Browse files
committed
updated daytona repl to take the right default key
1 parent 87f8f23 commit 8586675

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎examples/daytona_repl_example.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
Run with: python -m examples.daytona_repl_example
55
"""
66

7+
import os
8+
79
from rlm.clients.base_lm import BaseLM
810
from rlm.core.lm_handler import LMHandler
911
from rlm.core.types import ModelUsageSummary, UsageSummary
@@ -74,6 +76,7 @@ def main():
7476
with DaytonaREPL(
7577
name="rlm-example-handler",
7678
lm_handler_address=handler.address,
79+
api_key=os.getenv("DAYTONA_API_KEY"),
7780
) as repl:
7881
print(f"Daytona sandbox started with ID: {repl.sandbox.id}")
7982
print(f"Broker URL: {repl.broker_url}")

‎rlm/environments/daytona_repl.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import base64
88
import json
9+
import os
910
import textwrap
1011
import threading
1112
import time
@@ -350,7 +351,7 @@ def __init__(
350351
"""
351352
super().__init__(**kwargs)
352353

353-
self.api_key = api_key
354+
self.api_key = api_key or os.getenv("DAYTONA_API_KEY")
354355
self.target = target
355356
self.name = name
356357
self.timeout = timeout

0 commit comments

Comments
 (0)