Skip to content

Commit 56bad4c

Browse files
committed
Refactor local and production deployment pipelines to integrate chat interface visualization
1 parent dfe2f01 commit 56bad4c

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

llm-complete-guide/pipelines/local_deployment.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,3 @@
88
def local_deployment():
99
bento = bento_builder()
1010
bento_deployment(bento)
11-
create_chat_interface()
12-
13-
#vllm_model_deployer_step()

llm-complete-guide/pipelines/prod_deployment.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
from steps.bento_dockerizer import bento_dockerizer
1919
from steps.k8s_deployment import k8s_deployment
20+
from steps.visualize_chat import create_chat_interface
2021
from zenml import pipeline
2122

2223

@@ -28,4 +29,5 @@ def production_deployment(
2829
This is a pipeline deploys trained model for future inference.
2930
"""
3031
bento_model_image = bento_dockerizer()
31-
k8s_deployment(bento_model_image)
32+
deployment_info = k8s_deployment(bento_model_image)
33+
create_chat_interface(deployment_info)

llm-complete-guide/steps/visualize_chat.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
from typing import Optional
2-
from zenml import pipeline, step
1+
from typing import Optional, Dict, Any
2+
from typing_extensions import Annotated
3+
from zenml import log_artifact_metadata, pipeline, step
34
from zenml.types import HTMLString
45

56
@step(enable_cache=False)
6-
def create_chat_interface() -> HTMLString:
7+
def create_chat_interface(
8+
deployment_info: Dict[str, Any],
9+
) -> Annotated[HTMLString, "chat_bot"]:
710
html = """
811
<div id="zenml-chat-container" class="w-full max-w-4xl mx-auto">
912
<style>

0 commit comments

Comments
 (0)