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.
default_chatbot boolean false false If true, this is the chatbot that is accessible from the balloon on the corner of the course material. If false, this can be some other chatbot related to the course, such as a chatbot visible within the text of the course material.
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_chatbot_name_not_null n NOT NULL chatbot_name
chatbot_configurations_course_id_fkey FOREIGN KEY FOREIGN KEY (course_id) REFERENCES courses(id)
chatbot_configurations_course_id_not_null n NOT NULL course_id
chatbot_configurations_created_at_not_null n NOT NULL created_at
chatbot_configurations_daily_tokens_per_user_not_null n NOT NULL daily_tokens_per_user
chatbot_configurations_default_chatbot_not_null n NOT NULL default_chatbot
chatbot_configurations_enabled_to_students_not_null n NOT NULL enabled_to_students
chatbot_configurations_frequency_penalty_not_null n NOT NULL frequency_penalty
chatbot_configurations_hide_citations_not_null n NOT NULL hide_citations
chatbot_configurations_id_not_null n NOT NULL id
chatbot_configurations_initial_message_not_null n NOT NULL initial_message
chatbot_configurations_maintain_azure_search_index_if_use_azure CHECK CHECK (((use_azure_search = false) OR (maintain_azure_search_index = true)))
chatbot_configurations_maintain_azure_search_index_not_null n NOT NULL maintain_azure_search_index
chatbot_configurations_pkey PRIMARY KEY PRIMARY KEY (id)
chatbot_configurations_presence_penalty_not_null n NOT NULL presence_penalty
chatbot_configurations_prompt_not_null n NOT NULL prompt
chatbot_configurations_response_max_tokens_not_null n NOT NULL response_max_tokens
chatbot_configurations_temperature_not_null n NOT NULL temperature
chatbot_configurations_top_p_not_null n NOT NULL top_p
chatbot_configurations_updated_at_not_null n NOT NULL updated_at
chatbot_configurations_use_azure_search_not_null n NOT NULL use_azure_search
chatbot_configurations_use_semantic_reranking_not_null n NOT NULL use_semantic_reranking
chatbot_configurations_weekly_tokens_per_user_not_null n NOT NULL weekly_tokens_per_user

Indexes

Name Definition
chatbot_configurations_only_one_default CREATE UNIQUE INDEX chatbot_configurations_only_one_default ON public.chatbot_configurations USING btree (course_id, deleted_at) NULLS NOT DISTINCT WHERE (default_chatbot IS TRUE)
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