Last active
October 27, 2024 07:48
-
-
Save numpde/6accad1d434404ac4d214fb474e7afe5 to your computer and use it in GitHub Desktop.
WA/TS: Typesense collection schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "wa_conversations", | |
"fields": [ | |
{ | |
"name": "contacts.wa_id", | |
"type": "string", | |
"facet": true, | |
"optional": false, | |
"index": true, | |
"sort": false, | |
"infix": false, | |
"locale": "" | |
}, | |
{ | |
"name": "contacts.profile.name", | |
"type": "string", | |
"facet": false, | |
"optional": true, | |
"index": true, | |
"sort": false, | |
"infix": false, | |
"locale": "" | |
}, | |
{ | |
"name": "metadata.display_phone_number", | |
"type": "string", | |
"facet": true, | |
"optional": true, | |
"index": true, | |
"sort": false, | |
"infix": false, | |
"locale": "" | |
}, | |
{ | |
"name": "messages.timestamp", | |
"type": "int64", | |
"facet": false, | |
"optional": false, | |
"index": true, | |
"sort": true, | |
"infix": false, | |
"locale": "" | |
}, | |
{ | |
"name": "messages.id", | |
"type": "string", | |
"facet": false, | |
"optional": false, | |
"index": true, | |
"sort": false, | |
"infix": false, | |
"locale": "" | |
}, | |
{ | |
"name": "messages.from", | |
"type": "string", | |
"facet": true, | |
"optional": false, | |
"index": true, | |
"sort": false, | |
"infix": false, | |
"locale": "" | |
}, | |
{ | |
"name": "messages.type", | |
"type": "string", | |
"facet": true, | |
"optional": false, | |
"index": true, | |
"sort": false, | |
"infix": false, | |
"locale": "" | |
}, | |
{ | |
"name": "messages.text.body", | |
"type": "string", | |
"facet": false, | |
"optional": true, | |
"index": true, | |
"sort": false, | |
"infix": true, | |
"locale": "" | |
}, | |
{ | |
"name": "messages.image.id", | |
"type": "string", | |
"facet": false, | |
"optional": true, | |
"index": true, | |
"sort": false, | |
"infix": false, | |
"locale": "" | |
}, | |
{ | |
"name": "messages.image.mime_type", | |
"type": "string", | |
"facet": true, | |
"optional": true, | |
"index": true, | |
"sort": false, | |
"infix": false, | |
"locale": "" | |
}, | |
{ | |
"name": "messages.image.caption", | |
"type": "string", | |
"facet": false, | |
"optional": true, | |
"index": true, | |
"sort": false, | |
"infix": true, | |
"locale": "" | |
}, | |
{ | |
"name": "messages.special_data", | |
"type": "string", | |
"facet": false, | |
"optional": true, | |
"index": true, | |
"sort": false, | |
"infix": false, | |
"locale": "" | |
}, | |
{ | |
"name": "messages.special_data.location_name", | |
"type": "string", | |
"facet": true, | |
"optional": true, | |
"index": true, | |
"sort": false, | |
"infix": false, | |
"locale": "" | |
}, | |
{ | |
"name": "messages.special_data.audio_mime_type", | |
"type": "string", | |
"facet": true, | |
"optional": true, | |
"index": true, | |
"sort": false, | |
"infix": false, | |
"locale": "" | |
}, | |
{ | |
"name": "summary", | |
"type": "string", | |
"facet": false, | |
"optional": true, | |
"index": true, | |
"sort": false, | |
"infix": true, | |
"locale": "" | |
}, | |
{ | |
"name": "intent", | |
"type": "string", | |
"facet": true, | |
"optional": true, | |
"index": true, | |
"sort": false, | |
"infix": false, | |
"locale": "" | |
}, | |
{ | |
"name": "priority_level", | |
"type": "string", | |
"facet": true, | |
"optional": true, | |
"index": true, | |
"sort": false, | |
"infix": false, | |
"locale": "" | |
}, | |
{ | |
"name": "todo", | |
"type": "string", | |
"facet": true, | |
"optional": true, | |
"index": true, | |
"sort": false, | |
"infix": false, | |
"locale": "" | |
}, | |
{ | |
"name": "embedding", | |
"type": "float[]", | |
"facet": false, | |
"optional": false, | |
"index": true, | |
"sort": false, | |
"infix": false, | |
"locale": "", | |
"embed": { | |
"from": [ | |
"messages.text.body", | |
"messages.image.caption", | |
"summary" | |
], | |
"model_config": { | |
"api_key": "sk-pr***************************************************************************************************************************************************************", | |
"model_name": "openai/text-embedding-3-small" | |
} | |
}, | |
"num_dim": 1536, | |
"vec_dist": "cosine" | |
} | |
], | |
"default_sorting_field": "messages.timestamp", | |
"enable_nested_fields": false, | |
"symbols_to_index": [ | |
"@", | |
"#" | |
], | |
"token_separators": [ | |
"_", | |
"-", | |
"&" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment