You can specify the key in a constructor parameter api_key or in an environment variable YC_API_KEY.from langchain.chains import LLMChainfrom langchain.llms import YandexGPTfrom langchain.prompts import PromptTemplatetemplate = "What is the capital of {country}?"prompt = PromptTemplate(template=template, input_variables=["country"])llm = YandexGPT()llm_chain = LLMChain(prompt=prompt, llm=llm)country = "Russia"llm_chain.run(country)    'Moscow'PreviousXorbits Inference (Xinference)NextChat modelsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
This notebook goes over how to use Langchain with YandexGPT.
This notebook goes over how to use Langchain with YandexGPT. ->: You can specify the key in a constructor parameter api_key or in an environment variable YC_API_KEY.from langchain.chains import LLMChainfrom langchain.llms import YandexGPTfrom langchain.prompts import PromptTemplatetemplate = "What is the capital of {country}?"prompt = PromptTemplate(template=template, input_variables=["country"])llm = YandexGPT()llm_chain = LLMChain(prompt=prompt, llm=llm)country = "Russia"llm_chain.run(country)    'Moscow'PreviousXorbits Inference (Xinference)NextChat modelsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.