refactor: rename machine_name to instance_name in _bottle_for_slug
This commit is contained in:
@@ -652,7 +652,7 @@ def _bottle_for_slug(
|
|||||||
if slug in bottles:
|
if slug in bottles:
|
||||||
_cm, bottle, _identity = bottles[slug]
|
_cm, bottle, _identity = bottles[slug]
|
||||||
return bottle, ""
|
return bottle, ""
|
||||||
machine_name = f"bot-bottle-{slug}"
|
instance_name = f"bot-bottle-{slug}"
|
||||||
prompt_path: str | None = None
|
prompt_path: str | None = None
|
||||||
metadata = read_metadata(slug)
|
metadata = read_metadata(slug)
|
||||||
if metadata is not None and manifest is not None:
|
if metadata is not None and manifest is not None:
|
||||||
@@ -665,12 +665,12 @@ def _bottle_for_slug(
|
|||||||
backend = metadata.backend if metadata is not None else ""
|
backend = metadata.backend if metadata is not None else ""
|
||||||
if backend == "smolmachines":
|
if backend == "smolmachines":
|
||||||
synth: object = SmolmachinesBottle(
|
synth: object = SmolmachinesBottle(
|
||||||
machine_name,
|
instance_name,
|
||||||
prompt_path=prompt_path,
|
prompt_path=prompt_path,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
synth = DockerBottle(
|
synth = DockerBottle(
|
||||||
container=machine_name,
|
container=instance_name,
|
||||||
teardown=lambda: None,
|
teardown=lambda: None,
|
||||||
prompt_path_in_container=prompt_path,
|
prompt_path_in_container=prompt_path,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user