Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts[patch]: Nits to chat integration template #6288

Merged
merged 3 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion libs/langchain-scripts/src/cli/docs/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ export async function fillChatIntegrationDocTemplate(fields: {
.replace(TOKEN_USAGE_PLACEHOLDER, extraFields?.tokenUsage ? "✅" : "❌")
.replace(LOGPROBS_PLACEHOLDER, extraFields?.logprobs ? "✅" : "❌")
.replace(LOCAL_PLACEHOLDER, extraFields?.local ? "✅" : "❌")
.replace(SERIALIZABLE_PLACEHOLDER, extraFields?.serializable ? "✅" : "❌")
.replace(
SERIALIZABLE_PLACEHOLDER,
extraFields?.serializable ? "✅" : "beta"
)
.replace(PY_SUPPORT_PLACEHOLDER, extraFields?.pySupport ? "✅" : "❌");

const docPath = path.join(
Expand Down
16 changes: 5 additions & 11 deletions libs/langchain-scripts/src/cli/docs/templates/chat.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,14 @@
"source": [
"# __ModuleName__\n",
"\n",
"- TODO: Make sure API reference link is correct.\n",
"\n",
"This will help you getting started with __ModuleName__ [chat models](/docs/concepts/#chat-models). For detailed documentation of all __ModuleName__ features and configurations head to the [API reference](https://api.js.langchain.com/classes/__package_name_snake_case__.__ModuleName__.html).\n",
"\n",
"- TODO: Add any other relevant links, like information about models, prices, context windows, etc. See https://js.langchain.com/v0.2/docs/integrations/chat/openai/ for an example.\n",
"This will help you getting started with `__ModuleName__` [chat models](/docs/concepts/#chat-models). For detailed documentation of all `__ModuleName__` features and configurations head to the [API reference](https://api.js.langchain.com/classes/__package_name_snake_case__.__ModuleName__.html).\n",
"\n",
"## Overview\n",
"### Integration details\n",
"\n",
"- TODO: Fill in table features.\n",
"- TODO: Remove PY support link if not relevant, otherwise ensure link is correct.\n",
"- TODO: Make sure API reference links are correct.\n",
"- TODO: Make sure Python integration doc link is correct, if applicable.\n",
"\n",
"| Class | Package | Local | Serializable | [PY support](https:/py.langchain.com/v0.2/docs/integrations/chat/__package_name_short_snake_case__) | Package downloads | Package latest |\n",
"| Class | Package | Local | Serializable | [PY support](https:/python.langchain.com/v0.2/docs/integrations/chat/__package_name_short_snake_case__) | Package downloads | Package latest |\n",
"| :--- | :--- | :---: | :---: | :---: | :---: | :---: |\n",
"| [__ModuleName__](https://api.js.langchain.com/classes/__package_name_snake_case__.__ModuleName__.html) | [__package_name_pretty__](https://api.js.langchain.com/modules/__package_name_snake_case__.html) | __local__ | __serializable__ | __py_support__ | ![NPM - Downloads](https://img.shields.io/npm/dm/__package_name_pretty__?style=flat-square&label=%20) | ![NPM - Version](https://img.shields.io/npm/v/__package_name_pretty__?style=flat-square&label=%20) |\n",
"\n",
Expand All @@ -43,13 +37,13 @@
"\n",
"- TODO: Update with relevant info.\n",
"\n",
"To access __ModuleName__ models you'll need to create a/an __ModuleName__ account, get an API key, and install the `__package_name_pretty__` integration package.\n",
"To access `__ModuleName__` models you'll need to create a/an `__ModuleName__` account, get an API key, and install the `__package_name_pretty__` integration package.\n",
"\n",
"### Credentials\n",
"\n",
"- TODO: Update with relevant info.\n",
"\n",
"Head to (TODO: link) to sign up to __ModuleName__ and generate an API key. Once you've done this set the __MODULE_NAME_ALL_CAPS___API_KEY environment variable:\n",
"Head to (TODO: link) to sign up to `__ModuleName__` and generate an API key. Once you've done this set the `__MODULE_NAME_ALL_CAPS___API_KEY` environment variable:\n",
"\n",
"```{=mdx}\n",
"\n",
Expand Down
Loading