Class AiChatTurnTableInfo
Table 'ai_chat_turn': Contains AI Chatbot history - contains whole chat, not just what is sent to the chatbot. History is ready ordered by timestamp
Implements
Inherited Members
Namespace: SuperOffice.CRM.Data
Assembly: SoDataBase.dll
Syntax
[DatabaseTable("ai_chat_turn")]
public class AiChatTurnTableInfo : TableInfo, ICloneable
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetAiChatTurnInfo().
Fields
DictionaryTableName
Conceptual name of table AiChatTurn in the database dictionary: ai_chat_turn
Declaration
public const string DictionaryTableName = "ai_chat_turn"
Field Value
Type | Description |
---|---|
string |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetAiChatTurnInfo().
Properties
AiChatTurnId
Field 'ai_chat_turn_id' in table 'ai_chat_turn': Dictionary type PK, .NET type: int
Primary keyDeclaration
public Int32FieldInfo AiChatTurnId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetAiChatTurnInfo().
AssociateId
Field 'associate_id' in table 'ai_chat_turn': Dictionary type FK, target: Associate, .NET type: int
User id that is chatting with the botDeclaration
public Int32FieldInfo AssociateId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetAiChatTurnInfo().
AssociateId_InnerJoin_Associate
Generated join from the foreign key AssociateId in this table, to its target table AssociateTableInfo.
Declaration
public TargetedInnerJoin<AssociateTableInfo> AssociateId_InnerJoin_Associate { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<AssociateTableInfo> |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetAiChatTurnInfo().
Attachments
Field 'attachments' in table 'ai_chat_turn': Dictionary type Clob, .NET type: string
JSON Array of bot - NULL if not setDeclaration
public StringFieldInfo Attachments { get; }
Property Value
Type | Description |
---|---|
StringFieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetAiChatTurnInfo().
BotActions
Field 'bot_actions' in table 'ai_chat_turn': Dictionary type Clob, .NET type: string
Suggested actions (string dictionary) in JSON. NULL if not setDeclaration
public StringFieldInfo BotActions { get; }
Property Value
Type | Description |
---|---|
StringFieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetAiChatTurnInfo().
BotResponse
Field 'bot_response' in table 'ai_chat_turn': Dictionary type Clob, .NET type: string
AI Bot response to user_prompt - usually textDeclaration
public StringFieldInfo BotResponse { get; }
Property Value
Type | Description |
---|---|
StringFieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetAiChatTurnInfo().
ChatId
Field 'chat_id' in table 'ai_chat_turn': Dictionary type String[41], .NET type: string
The name of this chat topic - usually soproto + id (contact-123, sale-43, diary) but could also be an arbitrary nameDeclaration
public StringFieldInfo ChatId { get; }
Property Value
Type | Description |
---|---|
StringFieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetAiChatTurnInfo().
Definition
Definition of the table as described in the deployed runtime dictionary
Declaration
public override SoTable Definition { get; }
Property Value
Type | Description |
---|---|
SoTable |
Overrides
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetAiChatTurnInfo().
DictionaryTableNumber
Table number for table AiChatTurn in the database dictionary; potentially changes between databases, but always the same over the lifetime of any single database
Declaration
public int DictionaryTableNumber { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetAiChatTurnInfo().
RuntimeDefinition
Definition of the table as described in the deployed runtime dictionary
Declaration
[Obsolete("Use instance property Definition or static member DictionaryTableNumber", true)]
public static SoTable RuntimeDefinition { get; }
Property Value
Type | Description |
---|---|
SoTable |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetAiChatTurnInfo().
Timestamp
Field 'timestamp' in table 'ai_chat_turn': Dictionary type UtcDateTime, .NET type: DateTime
When the chat happened (UTC)Declaration
public DateTimeFieldInfo Timestamp { get; }
Property Value
Type | Description |
---|---|
DateTimeFieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetAiChatTurnInfo().
UserDisplaytext
Field 'user_displaytext' in table 'ai_chat_turn': Dictionary type Clob, .NET type: string
Display this text instead of the prompt (if set) - could be set by actionDeclaration
public StringFieldInfo UserDisplaytext { get; }
Property Value
Type | Description |
---|---|
StringFieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetAiChatTurnInfo().
UserPrompt
Field 'user_prompt' in table 'ai_chat_turn': Dictionary type Clob, .NET type: string
What the user typedDeclaration
public StringFieldInfo UserPrompt { get; }
Property Value
Type | Description |
---|---|
StringFieldInfo |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetAiChatTurnInfo().
Methods
IdxAssociateId(int)
Shortcut method for looking up using the database index AssociateId, which spans the following fields:
Field | Description |
---|---|
AssociateId | User id that is chatting with the bot |
Declaration
public Restriction IdxAssociateId(int associateId)
Parameters
Type | Name | Description |
---|---|---|
int | associateId |
Returns
Type | Description |
---|---|
Restriction |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetAiChatTurnInfo().
IdxAssociateIdChatId(int, string)
Shortcut method for looking up using the database index AssociateIdChatId, which spans the following fields:
Field | Description |
---|---|
AssociateId | User id that is chatting with the bot |
ChatId | The name of this chat topic - usually soproto + id (contact-123, sale-43, diary) but could also be an arbitrary name |
Declaration
public Restriction IdxAssociateIdChatId(int associateId, string chatId)
Parameters
Type | Name | Description |
---|---|---|
int | associateId | |
string | chatId |
Returns
Type | Description |
---|---|
Restriction |
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling TablesInfo.GetAiChatTurnInfo().