Merge branch 'master' into harrison/improve-integration-docs

This commit is contained in:
ccurme
2024-12-03 15:31:38 -05:00
committed by GitHub
38 changed files with 2673 additions and 1205 deletions

View File

@@ -39,7 +39,7 @@
"### Credentials\n",
"\n",
"\n",
"A valid [API key](https://console.mistral.ai/users/api-keys/) is needed to communicate with the API. Once you've done this set the MISTRAL_API_KEY environment variable:"
"A valid [API key](https://console.mistral.ai/api-keys/) is needed to communicate with the API. Once you've done this set the MISTRAL_API_KEY environment variable:"
]
},
{

View File

@@ -32,7 +32,7 @@ For a more detailed walkthrough of the Pinecone vectorstore, see [this notebook]
### Pinecone Hybrid Search
```bash
pip install pinecone-client pinecone-text
pip install pinecone pinecone-text
```
```python

View File

@@ -24,7 +24,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install --upgrade --quiet pinecone-client pinecone-text pinecone-notebooks"
"%pip install --upgrade --quiet pinecone pinecone-text pinecone-notebooks"
]
},
{

View File

@@ -245,7 +245,7 @@
"\n",
"import EmbeddingTabs from \"@theme/EmbeddingTabs\";\n",
"\n",
"<EmbeddingTabs customVarName=\"embeddings_model\" />"
"<EmbeddingTabs customVarName=\"embeddings\" />"
]
},
{

View File

@@ -15,6 +15,7 @@ import CodeBlock from "@theme-original/CodeBlock";
* @property {string} [googleParams] - Parameters for Google chat model. Defaults to `model="gemini-pro"`
* @property {string} [togetherParams] - Parameters for Together chat model. Defaults to `model="mistralai/Mixtral-8x7B-Instruct-v0.1"`
* @property {string} [nvidiaParams] - Parameters for Nvidia NIM model. Defaults to `model="meta/llama3-70b-instruct"`
* @property {string} [databricksParams] - Parameters for Databricks model. Defaults to `endpoint="databricks-meta-llama-3-1-70b-instruct"`
* @property {string} [awsBedrockParams] - Parameters for AWS Bedrock chat model.
* @property {boolean} [hideOpenai] - Whether or not to hide OpenAI chat model.
* @property {boolean} [hideAnthropic] - Whether or not to hide Anthropic chat model.
@@ -27,6 +28,7 @@ import CodeBlock from "@theme-original/CodeBlock";
* @property {boolean} [hideAzure] - Whether or not to hide Microsoft Azure OpenAI chat model.
* @property {boolean} [hideNvidia] - Whether or not to hide NVIDIA NIM model.
* @property {boolean} [hideAWS] - Whether or not to hide AWS models.
* @property {boolean} [hideDatabricks] - Whether or not to hide Databricks models.
* @property {string} [customVarName] - Custom variable name for the model. Defaults to `model`.
*/
@@ -46,6 +48,7 @@ export default function ChatModelTabs(props) {
azureParams,
nvidiaParams,
awsBedrockParams,
databricksParams,
hideOpenai,
hideAnthropic,
hideCohere,
@@ -57,6 +60,7 @@ export default function ChatModelTabs(props) {
hideAzure,
hideNvidia,
hideAWS,
hideDatabricks,
customVarName,
} = props;
@@ -79,6 +83,7 @@ export default function ChatModelTabs(props) {
`\n azure_endpoint=os.environ["AZURE_OPENAI_ENDPOINT"],\n azure_deployment=os.environ["AZURE_OPENAI_DEPLOYMENT_NAME"],\n openai_api_version=os.environ["AZURE_OPENAI_API_VERSION"],\n`;
const nvidiaParamsOrDefault = nvidiaParams ?? `model="meta/llama3-70b-instruct"`
const awsBedrockParamsOrDefault = awsBedrockParams ?? `model="anthropic.claude-3-5-sonnet-20240620-v1:0",\n beta_use_converse_api=True`;
const databricksParamsOrDefault = databricksParams ?? `endpoint="databricks-meta-llama-3-1-70b-instruct"`
const llmVarName = customVarName ?? "model";
@@ -182,6 +187,15 @@ export default function ChatModelTabs(props) {
default: false,
shouldHide: hideTogether,
},
{
value: "Databricks",
label: "Databricks",
text: `from databricks_langchain import ChatDatabricks\n\nos.environ["DATABRICKS_HOST"] = "https://example.staging.cloud.databricks.com/serving-endpoints"\n\n${llmVarName} = ChatDatabricks(${databricksParamsOrDefault})`,
apiKeyName: "DATABRICKS_TOKEN",
packageName: "databricks-langchain",
default: false,
shouldHide: hideDatabricks,
},
];
return (