langchain
langchain copied to clipboard
Add GooseAI, docs, and tests
trafficstars
Add GooseAI integration, Documentation, and tests. Hopefully, I am not missing anything.
Usage:
import os
from langchain.llms import GooseAI
from langchain import PromptTemplate, LLMChain
os.environ["GOOSEAI_API_KEY"] = ""
llm = GooseAI(max_tokens=10)
template = """Question: {question}
Answer: Let's think step by step."""
prompt = PromptTemplate(template=template, input_variables=["question"])
llm_chain = LLMChain(prompt=prompt, llm=llm)
question = "What NFL team won the Super Bowl in the year Justin Beiber was born?"
print(llm_chain.run(question))
Had to fix a test.
There might be one slight issue with Lint or something. I will have to check tomorrow.
Resolve conflict with newly added import in update
Closing this until I can figure out formatting errors. Going to open one that handles issues with linting and adds support for all LLM providers.