Skip to content

Commit

Permalink
format and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed Aug 2, 2024
1 parent 589354f commit dc1d1d1
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 7 deletions.
2 changes: 1 addition & 1 deletion libs/langchain-scripts/src/cli/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export const PYTHON_DOC_URL_PLACEHOLDER = "__python_doc_url__";

export const SERIALIZABLE_PLACEHOLDER = "__serializable__";
export const LOCAL_PLACEHOLDER = "__local__";
export const PY_SUPPORT_PLACEHOLDER = "__py_support__";
export const PY_SUPPORT_PLACEHOLDER = "__py_support__";
14 changes: 13 additions & 1 deletion libs/langchain-scripts/src/cli/docs/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@ import {
redBackground,
} from "../utils/get-input.js";
import { fetchURLStatus } from "../utils/fetch-url-status.js";
import { SIDEBAR_LABEL_PLACEHOLDER, MODULE_NAME_PLACEHOLDER, PACKAGE_NAME_PLACEHOLDER, FULL_IMPORT_PATH_PLACEHOLDER, ENV_VAR_NAME_PLACEHOLDER, API_REF_MODULE_PLACEHOLDER, API_REF_PACKAGE_PLACEHOLDER, PYTHON_DOC_URL_PLACEHOLDER, LOCAL_PLACEHOLDER, SERIALIZABLE_PLACEHOLDER, PY_SUPPORT_PLACEHOLDER } from "../constants.js";
import {
SIDEBAR_LABEL_PLACEHOLDER,
MODULE_NAME_PLACEHOLDER,
PACKAGE_NAME_PLACEHOLDER,
FULL_IMPORT_PATH_PLACEHOLDER,
ENV_VAR_NAME_PLACEHOLDER,
API_REF_MODULE_PLACEHOLDER,
API_REF_PACKAGE_PLACEHOLDER,
PYTHON_DOC_URL_PLACEHOLDER,
LOCAL_PLACEHOLDER,
SERIALIZABLE_PLACEHOLDER,
PY_SUPPORT_PLACEHOLDER,
} from "../constants.js";

const TOOL_CALLING_PLACEHOLDER = "__tool_calling__";
const JSON_MODE_PLACEHOLDER = "__json_mode__";
Expand Down
14 changes: 13 additions & 1 deletion libs/langchain-scripts/src/cli/docs/document_loaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@ import {
redBackground,
} from "../utils/get-input.js";
import { fetchURLStatus } from "../utils/fetch-url-status.js";
import { SIDEBAR_LABEL_PLACEHOLDER, MODULE_NAME_PLACEHOLDER, PACKAGE_NAME_PLACEHOLDER, FULL_IMPORT_PATH_PLACEHOLDER, ENV_VAR_NAME_PLACEHOLDER, PYTHON_DOC_URL_PLACEHOLDER, API_REF_MODULE_PLACEHOLDER, API_REF_PACKAGE_PLACEHOLDER, LOCAL_PLACEHOLDER, SERIALIZABLE_PLACEHOLDER, PY_SUPPORT_PLACEHOLDER } from "../constants.js";
import {
SIDEBAR_LABEL_PLACEHOLDER,
MODULE_NAME_PLACEHOLDER,
PACKAGE_NAME_PLACEHOLDER,
FULL_IMPORT_PATH_PLACEHOLDER,
ENV_VAR_NAME_PLACEHOLDER,
PYTHON_DOC_URL_PLACEHOLDER,
API_REF_MODULE_PLACEHOLDER,
API_REF_PACKAGE_PLACEHOLDER,
LOCAL_PLACEHOLDER,
SERIALIZABLE_PLACEHOLDER,
PY_SUPPORT_PLACEHOLDER,
} from "../constants.js";

const NODE_SUPPORT_PLACEHOLDER = "__fs_support__";
const NODE_ONLY_SIDEBAR_BADGE_PLACEHOLDER = "__node_only_sidebar__";
Expand Down
13 changes: 12 additions & 1 deletion libs/langchain-scripts/src/cli/docs/embeddings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,18 @@ import {
redBackground,
} from "../utils/get-input.js";
import { fetchURLStatus } from "../utils/fetch-url-status.js";
import { PACKAGE_NAME_PLACEHOLDER, MODULE_NAME_PLACEHOLDER, SIDEBAR_LABEL_PLACEHOLDER, FULL_IMPORT_PATH_PLACEHOLDER, LOCAL_PLACEHOLDER, PY_SUPPORT_PLACEHOLDER, ENV_VAR_NAME_PLACEHOLDER, API_REF_MODULE_PLACEHOLDER, API_REF_PACKAGE_PLACEHOLDER, PYTHON_DOC_URL_PLACEHOLDER } from "../constants.js";
import {
PACKAGE_NAME_PLACEHOLDER,
MODULE_NAME_PLACEHOLDER,
SIDEBAR_LABEL_PLACEHOLDER,
FULL_IMPORT_PATH_PLACEHOLDER,
LOCAL_PLACEHOLDER,
PY_SUPPORT_PLACEHOLDER,
ENV_VAR_NAME_PLACEHOLDER,
API_REF_MODULE_PLACEHOLDER,
API_REF_PACKAGE_PLACEHOLDER,
PYTHON_DOC_URL_PLACEHOLDER,
} from "../constants.js";

const TEMPLATE_PATH = path.resolve(
"./src/cli/docs/templates/text_embedding.ipynb"
Expand Down
14 changes: 13 additions & 1 deletion libs/langchain-scripts/src/cli/docs/llms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@ import {
redBackground,
} from "../utils/get-input.js";
import { fetchURLStatus } from "../utils/fetch-url-status.js";
import { API_REF_MODULE_PLACEHOLDER, API_REF_PACKAGE_PLACEHOLDER, ENV_VAR_NAME_PLACEHOLDER, FULL_IMPORT_PATH_PLACEHOLDER, LOCAL_PLACEHOLDER, MODULE_NAME_PLACEHOLDER, PACKAGE_NAME_PLACEHOLDER, PY_SUPPORT_PLACEHOLDER, PYTHON_DOC_URL_PLACEHOLDER, SERIALIZABLE_PLACEHOLDER, SIDEBAR_LABEL_PLACEHOLDER } from "../constants.js";
import {
API_REF_MODULE_PLACEHOLDER,
API_REF_PACKAGE_PLACEHOLDER,
ENV_VAR_NAME_PLACEHOLDER,
FULL_IMPORT_PATH_PLACEHOLDER,
LOCAL_PLACEHOLDER,
MODULE_NAME_PLACEHOLDER,
PACKAGE_NAME_PLACEHOLDER,
PY_SUPPORT_PLACEHOLDER,
PYTHON_DOC_URL_PLACEHOLDER,
SERIALIZABLE_PLACEHOLDER,
SIDEBAR_LABEL_PLACEHOLDER,
} from "../constants.js";

const TEMPLATE_PATH = path.resolve("./src/cli/docs/templates/llms.ipynb");
const INTEGRATIONS_DOCS_PATH = path.resolve(
Expand Down
10 changes: 9 additions & 1 deletion libs/langchain-scripts/src/cli/docs/retrievers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ import {
redBackground,
} from "../utils/get-input.js";
import { fetchURLStatus } from "../utils/fetch-url-status.js";
import { PACKAGE_NAME_PLACEHOLDER, MODULE_NAME_PLACEHOLDER, SIDEBAR_LABEL_PLACEHOLDER, FULL_IMPORT_PATH_PLACEHOLDER, PY_SUPPORT_PLACEHOLDER, API_REF_MODULE_PLACEHOLDER, PYTHON_DOC_URL_PLACEHOLDER } from "../constants.js";
import {
PACKAGE_NAME_PLACEHOLDER,
MODULE_NAME_PLACEHOLDER,
SIDEBAR_LABEL_PLACEHOLDER,
FULL_IMPORT_PATH_PLACEHOLDER,
PY_SUPPORT_PLACEHOLDER,
API_REF_MODULE_PLACEHOLDER,
PYTHON_DOC_URL_PLACEHOLDER,
} from "../constants.js";

const HAS_CLOUD_OFFERING_PLACEHOLDER = "__has_cloud_offering__";
const CAN_SELF_HOST_PLACEHOLDER = "__can_self_host__";
Expand Down
2 changes: 1 addition & 1 deletion libs/langchain-scripts/src/cli/utils/fetch-url-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export const fetchURLStatus = async (url: string): Promise<boolean> => {
} catch (_) {
return false;
}
};
};

0 comments on commit dc1d1d1

Please sign in to comment.