Index

public.chatbot_configurations

Description

Tells how a chatbot on a course should behave.

Columns

Name Type Default Nullable Children Parents Comment
chatbot_name varchar(1024) false This name will be used when presenting the chatbot to the students.
course_id uuid false public.courses The course this chatbot is appearing on
created_at timestamp with time zone now() false Timestamp when the record was created.
daily_tokens_per_user integer false The number of tokens a student can use per day. Limits the number of messages a student can send to the chatbot based on the complexity of the messages and responses.
deleted_at timestamp with time zone true Timestamp when the record was deleted. If null, the record is not deleted.
enabled_to_students boolean false false If enabled, students can use the chatbot..
frequency_penalty real 0.0 false The frequency penalty parameter for the chatbot. The value should be between 0 and 1.
hide_citations boolean false false Whether to show citations to user in the chatbot interface. If true, citations will be hidden on the frontend.
id uuid uuid_generate_v4() false public.chatbot_conversations A unique, stable identifier for the record.
initial_message varchar(32376) false The message the chatbot will send to the student when they open the chat for the first time.
maintain_azure_search_index boolean false false If, true, whenever a page is created, updated, or deleted, the the system will sync its contents to the the Azure Search index. If false, the chatbot will not update the Azure Search index. Note that at the moment the system does not delete unused indexes, so yoy want to optimize index costs, you may want to delete the indexes from the Azure portal.
presence_penalty real 0.0 false The presence penalty parameter for the chatbot. The value should be between 0 and 1.
prompt varchar(32376) false The prompt that the chatbot will use to start the conversation.
response_max_tokens integer 500 false The maximum number of tokens the chatbot can use to generate a response.
temperature real 0.7 false The temperature parameter for the chatbot. The higher the temperature, the more creative the chatbot will be. The value should be between 0 and 1.
top_p real 1.0 false The top_p parameter for the chatbot. The higher the top_p, the more creative the chatbot will be. The value should be between 0 and 1.
updated_at timestamp with time zone now() false Timestamp when the record was last updated. The field is updated automatically by the set_timestamp trigger.
use_azure_search boolean false false Whether to use Azure Search for chatbot search. Requires maintain_azure_search_index to be true.
use_semantic_reranking boolean false false Whether to use semantic reranking for chatbot search. Requires the feature to be enabled in Azure.
weekly_tokens_per_user integer false The number of tokens a student can use per week. Limits the number of messages a student can send to the chatbot based on the complexity of the messages and responses.

Constraints

Name Type Definition
chatbot_configurations_course_id_deleted_at_key UNIQUE UNIQUE NULLS NOT DISTINCT (course_id, deleted_at)
chatbot_configurations_course_id_fkey FOREIGN KEY FOREIGN KEY (course_id) REFERENCES courses(id)
chatbot_configurations_maintain_azure_search_index_if_use_azure CHECK CHECK (((use_azure_search = false) OR (maintain_azure_search_index = true)))
chatbot_configurations_pkey PRIMARY KEY PRIMARY KEY (id)

Indexes

Name Definition
chatbot_configurations_course_id_deleted_at_key CREATE UNIQUE INDEX chatbot_configurations_course_id_deleted_at_key ON public.chatbot_configurations USING btree (course_id, deleted_at) NULLS NOT DISTINCT
chatbot_configurations_pkey CREATE UNIQUE INDEX chatbot_configurations_pkey ON public.chatbot_configurations USING btree (id)

Triggers

Name Definition
set_timestamp CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.chatbot_configurations FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp()

Relations

er

Generated by tbls