langchain icon indicating copy to clipboard operation
langchain copied to clipboard

Add GooseAI, docs, and tests

Open conceptofmind opened this issue 2 years ago • 3 comments
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))

conceptofmind avatar Feb 06 '23 04:02 conceptofmind

Had to fix a test.

conceptofmind avatar Feb 06 '23 04:02 conceptofmind

There might be one slight issue with Lint or something. I will have to check tomorrow.

conceptofmind avatar Feb 06 '23 05:02 conceptofmind

Resolve conflict with newly added import in update

conceptofmind avatar Feb 09 '23 03:02 conceptofmind

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.

conceptofmind avatar Feb 09 '23 20:02 conceptofmind