Skip to content

Commit cf8fe5e

Browse files
committed
Replace .json profile references with .py
Profiles were changed from .json to .py files in bee3f3c, but the documentation was not updated everywhere.
1 parent afa2cbc commit cf8fe5e

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

interpreter/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
interpreter = Interpreter()
1919
2020
# Load from custom profile
21-
config = Config.from_file("~/custom_profile.json")
21+
config = Config.from_file("~/custom_profile.py")
2222
interpreter = Interpreter(config)
2323
2424
# Save current settings
25-
interpreter.save_config("~/my_settings.json")
25+
interpreter.save_config("~/my_settings.py")
2626
"""
2727

2828
# Use lazy imports to avoid loading heavy modules immediately

interpreter/interpreter.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ class Interpreter:
9999
100100
# With custom configuration
101101
from interpreter import Profile
102-
profile = Profile.from_file("~/custom_profile.json")
102+
profile = Profile.from_file("~/custom_profile.py")
103103
interpreter = Interpreter(profile)
104104
105105
# Save settings for later
106-
interpreter.save_profile("~/my_settings.json")
106+
interpreter.save_profile("~/my_settings.py")
107107
108108
Parameters
109109
----------
@@ -152,7 +152,7 @@ def load_profile(self, path):
152152
Load settings from a profile file
153153
154154
Example:
155-
>>> interpreter.load_profile("~/work_settings.json")
155+
>>> interpreter.load_profile("~/work_settings.py")
156156
"""
157157
self._profile.load(path)
158158
# Update interpreter attributes from new profile
@@ -164,7 +164,7 @@ def save_profile(self, path=None):
164164
Save current settings as a profile
165165
166166
Example:
167-
>>> interpreter.save_profile("~/my_preferred_settings.json")
167+
>>> interpreter.save_profile("~/my_preferred_settings.py")
168168
"""
169169
# Update profile object with current values
170170
self._profile.from_dict(self.to_dict())
@@ -177,7 +177,7 @@ def from_profile(cls, path):
177177
Create new interpreter instance from a profile file
178178
179179
Example:
180-
>>> interpreter = Interpreter.from_profile("~/work_settings.json")
180+
>>> interpreter = Interpreter.from_profile("~/work_settings.py")
181181
"""
182182
return cls(Profile.from_file(path))
183183

interpreter/misc/welcome.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,9 @@ def welcome_message():
254254
--serve Start in server mode
255255
256256
example: interpreter "create a python script"
257-
example: interpreter -m gpt-4 "analyze data.csv"
257+
example: interpreter -m gpt-4 "analyze data.csv"
258258
example: interpreter --auto-run "install nodejs"
259-
example: interpreter --profile work.json
259+
example: interpreter --profile work.py
260260
"""
261261
)
262262

@@ -282,9 +282,9 @@ def welcome_message():
282282
--serve Start in server mode
283283
284284
example: interpreter "create a python script"
285-
example: interpreter -m gpt-4 "analyze data.csv"
285+
example: interpreter -m gpt-4 "analyze data.csv"
286286
example: interpreter --auto-run "install nodejs"
287-
example: interpreter --profile work.json
287+
example: interpreter --profile work.py
288288
"""
289289
)
290290

interpreter/profiles.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ class Profile:
2020
profile = Profile()
2121
2222
# Load from specific profile
23-
profile = Profile.from_file("~/custom_profile.json")
23+
profile = Profile.from_file("~/custom_profile.py")
2424
2525
# Save current settings
26-
profile.save("~/my_settings.json")
26+
profile.save("~/my_settings.py")
2727
"""
2828

2929
DEFAULT_PROFILE_FOLDER = "~/.openinterpreter"

0 commit comments

Comments
 (0)