Skip to content

Commit

Permalink
Prefix env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 committed Mar 15, 2024
1 parent a325c05 commit 4b9c372
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
14 changes: 7 additions & 7 deletions examples/src/indexes/vector_stores/couchbase/.env.example
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Couchbase connection params
DB_CONN_STR=
DB_USERNAME=
DB_PASSWORD=
COUCHBASE_DB_CONN_STR=
COUCHBASE_DB_USERNAME=
COUCHBASE_DB_PASSWORD=

# Couchbase vector store args
DB_BUCKET_NAME=
DB_SCOPE_NAME=
DB_COLLECTION_NAME=
DB_INDEX_NAME=
COUCHBASE_DB_BUCKET_NAME=
COUCHBASE_DB_SCOPE_NAME=
COUCHBASE_DB_COLLECTION_NAME=
COUCHBASE_DB_INDEX_NAME=

# Open AI Key for embeddings
OPENAI_API_KEY=
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import { Cluster } from "couchbase";
import { TextLoader } from "langchain/document_loaders/fs/text";
import { CharacterTextSplitter } from "langchain/text_splitter";

const connectionString = process.env.DB_CONN_STR ?? "couchbase://localhost";
const databaseUsername = process.env.DB_USERNAME ?? "Administrator";
const databasePassword = process.env.DB_PASSWORD ?? "Password";
const connectionString =
process.env.COUCHBASE_DB_CONN_STR ?? "couchbase://localhost";
const databaseUsername = process.env.COUCHBASE_DB_USERNAME ?? "Administrator";
const databasePassword = process.env.COUCHBASE_DB_PASSWORD ?? "Password";

// Load documents from file
const loader = new TextLoader("./state_of_the_union.txt");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ import {
} from "../couchbase.js";

describe.skip("Couchbase vector store", () => {
const connectionString = process.env.DB_CONN_STR ?? "couchbase://localhost";
const databaseUsername = process.env.DB_USERNAME ?? "Administrator";
const databasePassword = process.env.DB_PASSWORD ?? "Password";
const bucketName = process.env.DB_BUCKET_NAME ?? "testing";
const scopeName = process.env.DB_SCOPE_NAME ?? "_default";
const collectionName = process.env.DB_COLLECTION_NAME ?? "_default";
const indexName = process.env.DB_INDEX_NAME ?? "vector-index";
const connectionString =
process.env.COUCHBASE_DB_CONN_STR ?? "couchbase://localhost";
const databaseUsername = process.env.COUCHBASE_DB_USERNAME ?? "Administrator";
const databasePassword = process.env.COUCHBASE_DB_PASSWORD ?? "Password";
const bucketName = process.env.COUCHBASE_DB_BUCKET_NAME ?? "testing";
const scopeName = process.env.COUCHBASE_DB_SCOPE_NAME ?? "_default";
const collectionName = process.env.COUCHBASE_DB_COLLECTION_NAME ?? "_default";
const indexName = process.env.COUCHBASE_DB_INDEX_NAME ?? "vector-index";
const textFieldKey = "text";
const embeddingFieldKey = "embedding";
const isScopedIndex = true;
Expand Down

0 comments on commit 4b9c372

Please sign in to comment.