mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-08 05:39:13 +00:00
Allow automation as an output mode supported by custom agents
This commit is contained in:
@@ -0,0 +1,24 @@
|
|||||||
|
# Generated by Django 5.0.8 on 2024-10-17 18:13
|
||||||
|
|
||||||
|
import django.contrib.postgres.fields
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
("database", "0067_alter_agent_style_icon"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="agent",
|
||||||
|
name="output_modes",
|
||||||
|
field=django.contrib.postgres.fields.ArrayField(
|
||||||
|
base_field=models.CharField(
|
||||||
|
choices=[("text", "Text"), ("image", "Image"), ("automation", "Automation")], max_length=200
|
||||||
|
),
|
||||||
|
default=list,
|
||||||
|
size=None,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -174,6 +174,7 @@ class Agent(BaseModel):
|
|||||||
# These map to various ConversationCommand types
|
# These map to various ConversationCommand types
|
||||||
TEXT = "text"
|
TEXT = "text"
|
||||||
IMAGE = "image"
|
IMAGE = "image"
|
||||||
|
AUTOMATION = "automation"
|
||||||
|
|
||||||
creator = models.ForeignKey(
|
creator = models.ForeignKey(
|
||||||
KhojUser, on_delete=models.CASCADE, default=None, null=True, blank=True
|
KhojUser, on_delete=models.CASCADE, default=None, null=True, blank=True
|
||||||
|
|||||||
@@ -347,12 +347,13 @@ tool_descriptions_for_llm = {
|
|||||||
|
|
||||||
mode_descriptions_for_llm = {
|
mode_descriptions_for_llm = {
|
||||||
ConversationCommand.Image: "Use this if the user is requesting you to generate a picture based on their description.",
|
ConversationCommand.Image: "Use this if the user is requesting you to generate a picture based on their description.",
|
||||||
ConversationCommand.Automation: "Use this if the user is requesting a response at a scheduled date or time.",
|
ConversationCommand.Automation: "Use this if you are confident the user is requesting a response at a scheduled date, time and frequency",
|
||||||
ConversationCommand.Text: "Use this if the other response modes don't seem to fit the query.",
|
ConversationCommand.Text: "Use this if the other response modes don't seem to fit the query.",
|
||||||
}
|
}
|
||||||
|
|
||||||
mode_descriptions_for_agent = {
|
mode_descriptions_for_agent = {
|
||||||
ConversationCommand.Image: "Agent can generate image in response.",
|
ConversationCommand.Image: "Agent can generate image in response.",
|
||||||
|
ConversationCommand.Automation: "Agent can schedule a task to run at a scheduled date, time and frequency in response.",
|
||||||
ConversationCommand.Text: "Agent can generate text in response.",
|
ConversationCommand.Text: "Agent can generate text in response.",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user