Secrets
Learn more about the LangStream project here.
Secrets
A place to hold secrets. Each label:value in this file is used as a reference in configuration and pipeline manifests. Their values carry on to a step’s environment where it is applied. Secret values can be modified directly in secrets.yaml, or you can pass secrets as environment variables.
Manifest
An example secrets.yaml manifest contains the credentials necessary to connect to Astra and OpenAI.
The :-
characters designate a default value. For example, provider: "${OPEN_AI_PROVIDER:-openai}"
designates openai
as the default.
For finding these credentials, see Credentials.
Pass secrets as environment variables
Secret values can be modified directly in secrets.yaml, or you can pass your secrets as environment variables. The secrets.yaml resolves these environment variables.
When you go to production, you should create a dedicated secrets.yaml file for each environment.
Credentials
Where do you find credentials for these items? Here's a little help:
kafka
username
ssl.properties
KAFKA_USERNAME=langstream-tenant
password
ssl.properties
KAFKA_PASSWORD=token:eyXxx...
tenant
ssl.properties
KAFKA_USERNAME=langstream-tenant
bootstrap.servers
ssl.properties
KAFKA_BOOTSTRAP_SERVERS=kafka-gcp-useast1.streaming.datastax.com:9093
open-ai
vertex-ai
serviceAccountJSON
A JSON file downloaded from the Google console containing auth info.
VERTEX_AI_JSON=xxx
hugging-face
provider
Can be api
or local
HUGGING_FACE_PROVIDER=api
embeddings-model-url
HUGGING_FACE_EMBEDDINGS_MODEL_URL=djl://ai.djl.huggingface.pytorch/intfloat/multilingual-e5-small
astra
clientID
ASTRA_CLIENT_ID=fnsNZtMgvgBHurHJjfSbgQwifnsNZtMgvgBHurHJjfSbgQwi ClientID is generated with token
secureBundle
Base64-encoded secure connect bundle downloaded from Astra
ASTRA_SECURE_BUNDLE="file:secure-connect-bundle.zip"
s3
github
pinecone
Please note that the example values provided are taken from the current content and may not accurately reflect the actual values that should be used for each secret.
secrets
The base node in the yaml, Holds the collection of secrets.
name
The secret name used for display
id
The id of the secret used for referencing its value
data
<any key:value>
Object of applicable values, given the secret. Provide any combination of key:value that is applicable to the given secret.
To retrieve the values use the format - secrets.<name>.<key> (don't include "data" when referencing secrets)
Last updated