WiseGPTEx

WiseGPTEx is an Elixir library that utilizes OpenAI's GPT-3.5-turbo model to provide intelligent question answering and reasoning capabilities.

Installation

  1. Add wise_gpt_ex to your list of dependencies in mix.exs:
def deps do
  [
    {:wise_gpt_ex, "~> 0.1.0"}
  ]
end
  1. Add the OpenAI API key to your configuration file (e.g., config/config.exs):
config :wise_gpt_ex, :openai_api_key, "your_openai_api_key"

Usage

To use WiseGPTEx, simply call the get_best_completion/2 function with a question and optional list of options:

{:ok, response} = WiseGPTEx.get_best_completion("What is the capital of France?")

You can also pass options to customize the API request:

opts = [model: "gpt-4", temperature: 0.4, num_completions: 4, timeout: 300_000]
{:ok, response} = WiseGPTEx.get_best_completion("What is the capital of France?", opts)

Options

The following options can be passed to the get_best_completion/2 function: