'''
Goose AI
pip install openai
Uses GPT-NeoX 20B to generate text.
input_query - A string, the input query (e.g. "what is a dog?")
output - A string, the generated text
openai.api_key - your GooseAI API key
'''
def GooseAI(input_query: str):
openai.api_key = "YOUR_API_KEY"
openai.api_base = "https://api.goose.ai/v1"
# Create a completion, return results streaming as they are generated.
# Run with `python3 -u` to ensure unbuffered output.
completion = openai.Completion.create(
engine="gpt-neo-20b",
prompt=input_query,
max_tokens=160
)
return completion.choices[0].text