forked from ai-cfia/finesse-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.env.template
82 lines (58 loc) · 4.02 KB
/
.env.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Endpoint URL of Azure Cognitive Search service. Format:
# https://[service-name].search.windows.net
FINESSE_BACKEND_AZURE_SEARCH_ENDPOINT=
# API key for Azure Cognitive Search. Used for operations such as
# querying the search index.
FINESSE_BACKEND_AZURE_SEARCH_API_KEY=
# Name of the search index in Azure Cognitive Search. Contains documents
# for search operations.
FINESSE_BACKEND_AZURE_SEARCH_INDEX_NAME=
# Boolean flag to enable or disable debug mode for the application. Optional.
# FINESSE_BACKEND_DEBUG_MODE=False
# URL for static search files.
# FINESSE_BACKEND_STATIC_FILE_URL=https://api.github.com/repos/ai-cfia/finesse-data/contents
# Message for empty search query errors. Optional.
# FINESSE_BACKEND_ERROR_EMPTY_QUERY="Search query cannot be empty"
# Message for Azure search failures. Optional.
# FINESSE_BACKEND_ERROR_AZURE_FAILED="Azure index search failed."
# Message for Finesse data search failures. Optional.
# FINESSE_BACKEND_ERROR_FINESSE_DATA_FAILED="finesse-data static search failed"
# Message for unexpected errors. Optional.
# FINESSE_BACKEND_ERROR_UNEXPECTED="Unexpected error."
# Threshold for fuzzy matching queries to finesse-data files. Represents the minimum
# score (out of 100) for a match to be considered close enough. Optional.
# FINESSE_BACKEND_FUZZY_MATCH_THRESHOLD=90
# Regular expression pattern used for sanitizing input to prevent log injection. Optional.
# FINESSE_BACKEND_SANITIZE_PATTERN="[^\w \d\"#\$%&'\(\)\*\+,-\.\/:;?@\^_`{\|}~]+|\%\w+|;|/|\(|\)]"
# API key for OpenAI, used for authentication when making requests.
OPENAI_API_KEY=
# The version of the OpenAI API being used.
OPENAI_API_VERSION=
# Deployment name for GPT-based models in Azure OpenAI.
AZURE_OPENAI_GPT_DEPLOYMENT=
# Deployment name for ChatGPT models in Azure OpenAI.
AZURE_OPENAI_CHATGPT_DEPLOYMENT=
# Data Source Name (DSN) for configuring a database connection in Louis's system.
# Format: postgresql://PGUSER:PGPASSWORD@DB_SERVER_CONTAINER_NAME/PGBASE
LOUIS_DSN=
# Schema within the Louis database system.
# Example: louis_0.0.5
LOUIS_SCHEMA=
# Endpoint URL for making requests to the OpenAI API.
OPENAI_ENDPOINT=
# File containing the weights for the search.
FINESSE_WEIGHTS={"recency":1,"traffic":1,"current":0.5,"typicality":0.2,"similarity":1}
# Specific OpenAI API model engine to be used.
OPENAI_API_ENGINE=
# JSON map for transforming Azure Search responses. Represented as a JSON string. Optional.
# Knowledge of the index search result structure is required.
FINESSE_BACKEND_AZURE_SEARCH_TRANSFORM_MAP={"id": "/id", "title": "/title", "score": "/@search.score", "url": "/url", "content": "/@search.highlights/content/0", "last_updated": "/last_updated"}
# Parameters for Azure Cognitive Search queries. Represented as a JSON string. Optional.
# Consult https://learn.microsoft.com/en-us/python/api/azure-search-documents/azure.search.documents.searchclient?view=azure-python#azure-search-documents-searchclient-search
FINESSE_BACKEND_AZURE_SEARCH_PARAMS={"highlight_fields": "content", "highlight_pre_tag": "<strong>", "highlight_post_tag": "</strong>", "query_type": "semantic", "semantic_configuration_name": "Semantic-config-public-guidance-docs"}
# Parameters for configuring the model used for embeddings. Contact your cloud admin for secrets.
FINESSE_BACKEND_LLAMAINDEX_EMBED_MODEL_PARAMS={"api_key": "<openai_api_key>", "api_version": "2023-07-01-preview", "azure_endpoint": "<azure_endpoint>", "deployment_name": "ada", "model": "text-embedding-ada-002"}
# Parameters for the vector store configuration. Contact your cloud admin for secrets.
FINESSE_BACKEND_LLAMAINDEX_VECTOR_STORE_PARAMS={"database": "llamaindex_db_legacy", "schema_name": "v_0_0_2", "embed_dim": 1536, "host": "<postgres_host>", "password": "<postgres_password>", "port": "5432", "user": "<postgres_user>"}
# Paths for transforming search results from the vector store.
FINESSE_BACKEND_LLAMAINDEX_TRANS_PATHS={"id": "node/id_", "url": "node/metadata/url", "title": "node/metadata/title", "last_updated": "node/metadata/last_crawled", "score": "score", "content": "node/text"}