cron:calculate-embeddings
Calculates the vectors of for elements whose text changed.
Takes no arguments or options. Writes of elements which change the text of an embedding queue the element internally; this command drains that queue: it evaluates the texts of the queued elements, sends them to the embedding , several in one request where the provider supports it, and writes the vectors. Requests to different providers run at the same time, up to concurrency requests per provider. Elements which were changed again in the meantime keep their vector until their next turn, elements which were deleted are skipped.
Failing sources are logged and change nothing. Failing providers are retried with the next runs, up to three times. If a provider limits the rate of requests (429 Too Many Requests), it gets no further requests in this run, and its elements wait for the next run; the other providers continue. Requests are not started after the working time of the run, their elements also wait for the next run.
Every API instance already schedules this every 5 minutes (see Background ), so it does not need to be invoked manually.
Help
php bin/console cron:calculate-embeddings --helpDescription: Calculates the vectors of embeddings, for elements whose texts changed. Usage: cron:calculate-embeddings Options: -h, --help Display help for the given command. When no command is given display help for the list command --silent Do not output any message -q, --quiet Only errors are displayed. All other output is suppressed -V, --version Display this application version --ansi|--no-ansi Force (or disable --no-ansi) ANSI output -n, --no-interaction Do not ask any interactive question -e, --env=ENV The Environment name. [default: "prod"] --no-debug Switch off debug mode. --profile Enables profiling (requires debug). -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Example
php bin/console cron:calculate-embeddings▄ ▄▀ ▀▄ Ember Nexus API ▀█▀ v0.3.0, production mode Cron Calculating embeddings of changed elements... ▶ Processed 0 queued element(s).