Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Goose AI #12

Open
conceptofmind opened this issue Feb 23, 2023 · 1 comment
Open

Goose AI #12

conceptofmind opened this issue Feb 23, 2023 · 1 comment

Comments

@conceptofmind
Copy link
Owner

'''
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
@conceptofmind
Copy link
Owner Author

No strong opinion. Huggingface API tool overlaps with this one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant