<@U01NZ4D0LDD> Confirming another issue I mentione...
# community-help
g
@Jason Bosco Confirming another issue I mentioned previously: I have a collection with an embedding field that uses 2 array fields in
from
. When I create a document where both arrays are empty, Typesense returns an error saying
Unexpected token in JSON at position 14
.
I'm using the JS SDK and this is the logged error.
These are the relevant fields from the collection schema:
Copy code
{
      "facet": false,
      "index": true,
      "infix": false,
      "locale": "",
      "name": "segments",
      "optional": false,
      "sort": false,
      "type": "string[]"
    },
    {
      "facet": false,
      "index": true,
      "infix": false,
      "locale": "",
      "name": "topics",
      "optional": false,
      "sort": false,
      "type": "string[]"
    },
    {
      "embed": {
        "from": [
          "segments",
          "topics"
        ],
        "model_config": {
          "api_key": "sk-************************************************",
          "model_name": "openai/text-embedding-ada-002"
        }
      },
      "facet": false,
      "index": true,
      "infix": false,
      "locale": "",
      "name": "embedding",
      "num_dim": 1536,
      "optional": false,
      "sort": false,
      "type": "float[]"
    },
j
Got it, thank you for reporting this
👍 1
g
To reproduce, try to create a document with
{ segments: [], topics: [] }
.
👍 1