forked from EniasCailliau/GirlfriendGPT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.py
34 lines (26 loc) · 915 Bytes
/
deploy.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import os
import uuid
from steamship import Steamship
from steamship.cli.cli import deploy
from steamship.data.manifest import Manifest
try:
deploy()
except SystemExit as err:
pass
manifest = Manifest.load_manifest()
client = Steamship(workspace=f"girlfriend-ai-{uuid.uuid1()}")
bot = client.use(
package_handle=manifest.handle,
version=manifest.version,
instance_handle=f"{manifest.handle}-{manifest.version.replace('.', '-')}",
config={"bot_token": os.environ.get("BOT_TOKEN") or input("bot_token: "),
"elevenlabs_voice_id": os.environ.get("ELEVENLABS_VOICE_ID"),
"elevenlabs_api_key": os.environ.get("ELEVENLABS_API_KEY")},
)
bot.wait_for_init()
print(client.config.workspace_handle)
print(bot.package_version_handle)
print(
f"""Chat with your bot here:
https://www.steamship.com/workspaces/{client.config.workspace_handle}/packages/{bot.handle}"""
)