From c1049a5d102c17e03df3f60a6cefb060d4680118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E7=92=9F=E7=90=A6?= Date: Sat, 6 Apr 2024 06:48:27 +0800 Subject: [PATCH] add solar example (#373) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: João Moura --- docs/how-to/LLM-Connections.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/how-to/LLM-Connections.md b/docs/how-to/LLM-Connections.md index 51c8849f0..fc98fa7c0 100644 --- a/docs/how-to/LLM-Connections.md +++ b/docs/how-to/LLM-Connections.md @@ -110,6 +110,16 @@ OPENAI_API_BASE=https://api.mistral.ai/v1 OPENAI_MODEL_NAME="mistral-small" ``` +### Solar +```sh +from langchain_community.chat_models.solar import SolarChat +# Initialize language model +os.environ["SOLAR_API_KEY"] = "your-solar-api-key" +llm = SolarChat(max_tokens=1024) + +Free developer API key available here: https://console.upstage.ai/services/solar +Langchain Example: https://github.com/langchain-ai/langchain/pull/18556 +``` ### text-gen-web-ui ```sh OPENAI_API_BASE=http://localhost:5000/v1 @@ -128,9 +138,9 @@ Free developer API key available here: https://cohere.com/ Langchain Documentation: https://python.langchain.com/docs/integrations/chat/cohere ``` -### Azure Open AI -Azure's OpenAI API needs a distinct setup, utilizing the `langchain_openai` component for Azure-specific configurations. +### Azure Open AI Configuration +For Azure OpenAI API integration, set the following environment variables: ```sh AZURE_OPENAI_VERSION="2022-12-01" AZURE_OPENAI_DEPLOYMENT=""