Files
word-language-detector-ai-api/api.conf
T
2026-03-08 14:43:48 +01:00

77 lines
2.7 KiB
Plaintext

[server]
# The host to bind the socket. Default is '0.0.0.0'
# host=
# The port to listen. Default is 3000.
# port=
# The Access-Control-Allow-Origin HTTP Header. It controls which origin
# is allowed to access the API. You can allow all origins by setting it
# to '*'. Default is '*'.
# Note: This only affects access via JavaScript in browsers. Moreover,
# a HTTP request is always sent when JavaScript in browsers attempts to
# access the API, even when it runs on a domain that is not allowed in
# 'allowOrigin'. In this case, however, the response is simply not made
# accessible for JavaScript.
# If the API is intended for access via a specific website, setting the
# property to the domain of the site is strongly recommended.
# Furthermore, note that this is not a protection for the API. It is
# simply a note for the browser to control which websites can access it.
# In a non-browser context, this has no effect.
# For an example, set it to 'http://example.com:8000' (NOT
# 'http://example.com:8000/') if you want to access the API from
# 'http://example.com:8000'.
# allowOrigin=
[docs]
# The path for the Swagger UI documentation. If an empty path is
# specified, no Swagger UI documentation will be available. Default is
# '/docs'.
# swagger=
# The path for the ReDoc documentation. If an empty path is specified,
# no ReDoc documentation will be available. Default is '/redoc'.
# redoc=
# The path for the Open API API specification. If an empty path is
# specified, no API specification will be available. Default is
# '/openapi.json'.
# Warning: If the API specification is not available, Swagger UI and
# ReDoc documentation may not work.
# openapi=
[model]
# The model directory has to include following files:
# 'label_encoder.json' (label encoder)
# 'language_detector.keras' (model)
# 'max_len' (token maximum length)
# 'tokenizer.json' (tokenizer)
# Default is '', so setting this option is required.
# Note: You should specify the absolute path instead of the relative
# path (e. g. '/path/to/model/' instead of 'model/')
modelDirectory=
# If true, TensorFlow will be only imported when it is needed for the
# first time, rather than when the server is started. But, this will
# slow down the first API request. Default is true.
# lazyImport=
[cache]
# If true, the results are cached. Default is true.
# enableCache=
# The TTL (time to live) in seconds for items in the cache. Default is
# 120.
# ttl=
# The maximum size of the cache. It specifies how many items can be
# cached at the same time. When this limit is exceeded by a new item,
# the least used item will be deleted. Default is 256.
# maxSize=
[logging]
# The file for the logs. Default is stdout ('/proc/self/fd/1').
# logfile=
# The log level. Default is INFO.
# loglevel=