TLDR.OpenAI.Context (tl_dr v0.1.0)
This module is a basic context for the OpenAI API.
Link to this section Summary
Functions
It build the context using the given options.
Link to this section Functions
Link to this function
build(access_token \\ System.get_env("OPENAI_ACCESS_TOKEN"), engine \\ "text-babbage-001")
It build the context using the given options.
example
Example
With all parameters
iex> TLDR.OpenAI.Context.build("my_access_token", "my_engine")
%TLDR.OpenAI.Context{access_token: "my_access_token", engine: "my_engine"}
With only the access_token
iex> TLDR.OpenAI.Context.build("my_access_token")
%TLDR.OpenAI.Context{access_token: "my_access_token", engine: "text-babbage-001"}
Without any arguments it will use the environment variables OPENAI_ACCESS_TOKEN and text-babbage-001.