Skip to content
This repository was archived by the owner on Jul 16, 2024. It is now read-only.

Commit a84d1b4

Browse files
committed
debug
1 parent 5eb4706 commit a84d1b4

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

localstack_openai/extension.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def on_platform_start(self):
1818
port = services.external_service_ports.reserve_port()
1919
self.backend_url = f"http://localhost:{port}"
2020

21+
print(f"Starting mock OpenAI service on {self.backend_url}")
2122
mock_openai.run(port)
2223
atexit.register(mock_openai.stop)
2324

localstack_openai/mock_openai.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def list_engines():
225225

226226

227227
def run(port=1323):
228-
app.run(port=port)
228+
app.run(port=port, debug=True)
229229

230230

231231
def stop():
Binary file not shown.

tests/test_chat_completion.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import openai
22
openai.organization = "org-test"
33
openai.api_key = "test"
4-
openai.api_base = "http://localhost:1323/v1"
4+
# openai.api_base = "http://localhost:1323/v1"
5+
openai.api_base = "https://localhost.localstack.cloud:1323/v1"
56

67

78
def test_list_models():

0 commit comments

Comments
 (0)