Skip to content

Commit

Permalink
show deployed chatbot url
Browse files Browse the repository at this point in the history
  • Loading branch information
javierluraschi committed May 17, 2024
1 parent a725424 commit 696435e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion python/hal9.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
{
"cell_type": "code",
"source": [
"!HAL9_TOKEN= hal9 deploy ."
"!hal9 deploy ."
],
"metadata": {},
"execution_count": null,
Expand Down
4 changes: 1 addition & 3 deletions python/hal9/targets/hal9.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def create_deployment(path :str) -> str:
file_path = os.path.join(root, file)
zipf.write(file_path, os.path.relpath(file_path, path))

print(f"Created {zip_path}")
return zip_path

def request_deploy(path :str, url :str) -> str:
Expand All @@ -46,8 +45,6 @@ def request_deploy(path :str, url :str) -> str:
'type': 'ability',
}

print(f'Uploading {upload_name}')

headers = {
'Content-Type': 'application/json',
'ApiKey': os.environ['HAL9_TOKEN'],
Expand All @@ -58,6 +55,7 @@ def request_deploy(path :str, url :str) -> str:
response.raise_for_status()

response_data = response.json()
print(response_data['url'])

def deploy(path :str, url :str) -> str:
if 'HAL9_TOKEN' in os.environ:
Expand Down
4 changes: 2 additions & 2 deletions python/hal9/templates/openai/app.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
name = input("What's your name? ")
print(f"Hello {name}")
echo = input()
print(f"Echo: {echo}")
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "hal9"
version = "2.1.1"
version = "2.1.2"
description = ""
authors = ["Javier Luraschi <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 696435e

Please sign in to comment.