Skip to content

GPT-3-Explorer is a Python suite for integrating OpenAI's GPT-3, providing interfaces for text completion, translation, and more using GPT-3's powerful language model.

Notifications You must be signed in to change notification settings

lixavi/gpt-3-explorer

Repository files navigation

GPT-3-Explorer

GPT-3-Explorer is a Python suite for integrating OpenAI's GPT-3, providing interfaces for text completion, translation, and more using GPT-3's powerful language model.

Installation

You can install GPT-3Explorer via pip:

pip install gpt-3-explorer

Make sure you have Python 3.6 or later installed.

Usage

from gpt3.completion import Completion
from gpt3.translation import Translation
from gpt3.utils import authenticate_api, load_configuration

# Authenticate with OpenAI API
api_key = load_configuration("config.json")["api_key"]
gpt3_instance = authenticate_api(api_key)

# Example: Text completion
completion = Completion(gpt3_instance)
prompt = "Once upon a time"
completed_text = completion.complete_text(prompt)
print(completed_text)

# Example: Translation
translation = Translation(gpt3_instance)
text = "Hello, how are you?"
translated_text = translation.translate_text(text, "en", "fr")
print(translated_text)

For more usage examples and advanced functionalities, refer to the examples directory.

About

GPT-3-Explorer is a Python suite for integrating OpenAI's GPT-3, providing interfaces for text completion, translation, and more using GPT-3's powerful language model.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published