forked from steamship-core/langchain-production-starter
-
Notifications
You must be signed in to change notification settings - Fork 445
/
deploy_all.py
31 lines (26 loc) · 1.04 KB
/
deploy_all.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
import json
import urllib.parse
from pathlib import Path
from uuid import uuid1
from steamship.cli.create_instance import _create_instance
from personalities import personalities
girlfriends_json = Path("girlfriends.json")
config = json.load(Path("sacha.conf").open())
girlfriends = []
workspace = str(uuid1())
for name, personality in personalities.items():
config["personality"] = name
instance = _create_instance(workspace=workspace,
instance_handle=name,
config=json.dumps(config))
girlfriends.append(
{
"name": name.title(),
"description": personality.byline,
"behavior": personality.behavior,
"identity": personality.identity,
"profile_image": personality.profile_image,
"chat_src": f"https://www.steamship.com/embed/chat?userHandle=enias&workspaceHandle={workspace}&instanceHandle={name}&ai_name={urllib.parse.quote(name.title())}"
}
)
json.dump(girlfriends, girlfriends_json.open("w"))