Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions bots/migrations/0113_botintegration_input_placeholder.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.1.3 on 2025-11-13 11:01

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("bots", "0112_alter_botintegration_slack_read_receipt_msg"),
]

operations = [
migrations.AddField(
model_name="botintegration",
name="input_placeholder",
field=models.TextField(blank=True, default=""),
),
]
2 changes: 2 additions & 0 deletions bots/models/bot_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ class BotIntegration(models.Model):
)

by_line = models.TextField(blank=True, default="")
input_placeholder = models.TextField(blank=True, default="")
descripton = models.TextField(blank=True, default="")
conversation_starters = models.JSONField(default=list, blank=True)
photo_url = CustomURLField(default="", blank=True)
Expand Down Expand Up @@ -599,6 +600,7 @@ def get_web_widget_branding(self) -> dict:
conversationStarters=self.conversation_starters,
photoUrl=self.photo_url,
websiteUrl=self.website_url,
inputPlaceholderText=self.input_placeholder,
)

def translate(self, text: str) -> str:
Expand Down
5 changes: 5 additions & 0 deletions daras_ai_v2/bot_integration_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,11 @@ def web_widget_config(bi: BotIntegration, user: AppUser | None, hostname: str |
key=f"_bi_website_url_{bi.id}",
value=bi.website_url,
)
bi.input_placeholder = gui.text_input(
"###### Message box placeholder",
key=f"_bi_input_placeholder_{bi.id}",
value=bi.input_placeholder,
)

gui.write("###### Conversation Starters")
bi.conversation_starters = list(
Expand Down