Files
semantic-kernel/python/.env.example
T
Stefano LottiniandEduard van Valkenburg 57b55af578 Python: (Astra DB) Include caller identity as user-agent when issuing HTTP request to Astra DB's Data API (#5921)
### Motivation and Context

This PR enriches the HTTP requests to the Astra DB Data API (occurring
in the AstraClient) with a User-Agent header specifying the identity of
the caller (specifically, "semantic_kernel"). While not mandatory, this
is good practice with Astra DB and helps collecting aggregate usage data
on the API side.

### Description

Using the `importlib.metadata` library the package version is extracted
(in a fail-safe way) and used, if present, to enrich the caller
information (variable `ASTRA_CALLER_IDENTITY`, later set as the
user-agent header for all HTTP requests to the Data API).

### Contribution Checklist

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄

---------

Co-authored-by: Eduard van Valkenburg <[email protected]>
2024-04-22 17:40:39 +00:00

48 lines
1.5 KiB
Bash

OPENAI_API_KEY=""
OPENAI_ORG_ID=""
AZURE_OPENAI_SYSTEM_MESSAGE="You are an AI assistant that helps people find information"
AZURE_OPENAI_API_VERSION="2024-02-15-preview"
AZURE_OPENAI_DEPLOYMENT_NAME=""
AZURE_OPENAI_ENDPOINT=""
AZURE_OPENAI_API_KEY=""
AZURE_OPENAI_TEMPERATURE=0
AZURE_OPENAI_MAX_TOKENS=1000
AZURE_OPENAI_TOP_P=1.0
AZURE_OPENAI_STREAM=true
AZURE_AISEARCH_URL=""
AZURE_AISEARCH_SERVICE=""
AZURE_AISEARCH_API_KEY=""
AZURE_AISEARCH_INDEX_NAME=""
AZURE_AISEARCH_EMBEDDING_DEPLOYMENT_NAME=""
AZURE_AISEARCH_USE_SEMANTIC_SEARCH=false
AZURE_AISEARCH_SEMANTIC_SEARCH_CONFIG=default
AZURE_AISEARCH_INDEX_IS_PRECHUNKED=false
AZURE_AISEARCH_TOP_K=5
AZURE_AISEARCH_ENABLE_IN_DOMAIN=true
AZURE_AISEARCH_CONTENT_COLUMNS=content
AZURE_AISEARCH_FILEPATH_COLUMN=filepath
AZURE_AISEARCH_TITLE_COLUMN=title
AZURE_AISEARCH_URL_COLUMN=url
AZURE_AISEARCH_VECTOR_COLUMNS=contentVector
AZURE_AISEARCH_QUERY_TYPE=simple
AZURE_AISEARCH_PERMITTED_GROUPS_COLUMN=
AZURE_AISEARCH_STRICTNESS=3
AZURE_AISEARCH_FILTER=""
MONGODB_ATLAS_CONNECTION_STRING=""
PINECONE_API_KEY=""
PINECONE_ENVIRONMENT=""
POSTGRES_CONNECTION_STRING=""
WEAVIATE_URL=""
WEAVIATE_API_KEY=""
GOOGLE_PALM_API_KEY=""
GOOGLE_SEARCH_ENGINE_ID=""
REDIS_CONNECTION_STRING=""
AZCOSMOS_API = "" // should be mongo-vcore for now, as CosmosDB only supports vector search in mongo-vcore for now.
AZCOSMOS_CONNSTR = ""
AZCOSMOS_DATABASE_NAME = ""
AZCOSMOS_CONTAINER_NAME = ""
# Starts with AstraCS:
ASTRADB_APP_TOKEN=""
ASTRADB_ID=""
ASTRADB_REGION=""
ASTRADB_KEYSPACE=""