Skip to main content


This community integration is deprecated. You should use ChatUpstage instead to access Solar LLM via the chat model connector.

import os

from import Solar

os.environ["SOLAR_API_KEY"] = "SOLAR_API_KEY"
llm = Solar()
llm.invoke("tell me a story?")
API Reference:Solar
from langchain.chains import LLMChain
from import Solar
from langchain_core.prompts import PromptTemplate

template = """Question: {question}

Answer: Let's think step by step."""

prompt = PromptTemplate.from_template(template)

llm = Solar()
llm_chain = LLMChain(prompt=prompt, llm=llm)

question = "What NFL team won the Super Bowl in the year Justin Beiber was born?"
API Reference:LLMChain | Solar | PromptTemplate

Was this page helpful?

You can also leave detailed feedback on GitHub.