From 67b0b852d28eec1bccc4c8dfb2513138ec39dbc4 Mon Sep 17 00:00:00 2001 From: bracesproul Date: Wed, 7 Aug 2024 17:04:29 -0700 Subject: [PATCH 1/2] api_refs[minor]: Hide all properties and non whitelisted methods of chat models --- .../typedoc_plugins/hide_underscore_lc.js | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/docs/api_refs/typedoc_plugins/hide_underscore_lc.js b/docs/api_refs/typedoc_plugins/hide_underscore_lc.js index 16919b9e7695..e89561f1ff66 100644 --- a/docs/api_refs/typedoc_plugins/hide_underscore_lc.js +++ b/docs/api_refs/typedoc_plugins/hide_underscore_lc.js @@ -9,6 +9,28 @@ const { const fs = require("fs"); const path = require("path"); +const WHITELISTED_CHAT_MODEL_INHERITED_METHODS = [ + "invoke", + "stream", + "batch", + "streamLog", + "streamEvents", + "bind", + "bindTools", + "asTool", + "pipe", + "withConfig", + "withRetry", + "assign", + "getNumTokens", + "getGraph", + "pick", + "withFallbacks", + "withStructuredOutput", + "withListeners", + "transform", +]; + const PATH_TO_LANGCHAIN_PKG_JSON = "../../langchain/package.json"; const BASE_OUTPUT_DIR = "./public"; const SCRIPT_HTML = `