YandexGPT | ü¶úÔ∏èüîó Langchain






Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsChat modelsAnthropicAnthropic FunctionsAnyscaleAzureAzureML Chat Online EndpointBaichuan ChatBaidu QianfanBedrock ChatCohereERNIE-Bot ChatEverlyAIFireworksGCP Vertex AIJinaChatKonkoüöÖ LiteLLMLlama APIMiniMaxOllamaOpenAIPromptLayer ChatOpenAITongyi QwenvLLM ChatYandexGPTDocument loadersDocument transformersText embedding modelsVector storesRetrieversToolsAgents and toolkitsMemoryCallbacksChat loadersComponentsChat modelsYandexGPTYandexGPTThis notebook goes over how to use Langchain with YandexGPT chat model.To use, you should have the yandexcloud python package installed.%pip install yandexcloudFirst, you should create service account with the ai.languageModels.user role.Next, you have two authentication options:IAM token.
You can specify the token in a constructor parameter iam_token or in an environment variable YC_IAM_TOKEN.API key
You can specify the key in a constructor parameter api_key or in an environment variable YC_API_KEY.from langchain.chat_models import ChatYandexGPTfrom langchain.schema import HumanMessage, SystemMessagechat_model = ChatYandexGPT()answer = chat_model(    [        SystemMessage(content="You are a helpful assistant that translates English to French."),        HumanMessage(content="I love programming.")    ])answer    AIMessage(content="Je t'aime programmer.")PreviousvLLM ChatNextDocument loadersCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
This notebook goes over how to use Langchain with YandexGPT chat model.
This notebook goes over how to use Langchain with YandexGPT chat model. ->: YandexGPT | ü¶úÔ∏èüîó Langchain






Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsChat modelsAnthropicAnthropic FunctionsAnyscaleAzureAzureML Chat Online EndpointBaichuan ChatBaidu QianfanBedrock ChatCohereERNIE-Bot ChatEverlyAIFireworksGCP Vertex AIJinaChatKonkoüöÖ LiteLLMLlama APIMiniMaxOllamaOpenAIPromptLayer ChatOpenAITongyi QwenvLLM ChatYandexGPTDocument loadersDocument transformersText embedding modelsVector storesRetrieversToolsAgents and toolkitsMemoryCallbacksChat loadersComponentsChat modelsYandexGPTYandexGPTThis notebook goes over how to use Langchain with YandexGPT chat model.To use, you should have the yandexcloud python package installed.%pip install yandexcloudFirst, you should create service account with the ai.languageModels.user role.Next, you have two authentication options:IAM token.
You can specify the token in a constructor parameter iam_token or in an environment variable YC_IAM_TOKEN.API key
You can specify the key in a constructor parameter api_key or in an environment variable YC_API_KEY.from langchain.chat_models import ChatYandexGPTfrom langchain.schema import HumanMessage, SystemMessagechat_model = ChatYandexGPT()answer = chat_model(    [        SystemMessage(content="You are a helpful assistant that translates English to French."),        HumanMessage(content="I love programming.")    ])answer    AIMessage(content="Je t'aime programmer.")PreviousvLLM ChatNextDocument loadersCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.