- Switch from
gpt-3.5-turbo
as cheapest default togpt-4o-mini
- Updated README and documentations
- fix an issue that can lead to integer overflow in
write_jsonl_files
. - Added
file_*
family of functions
- Added
file_upload
,batch_create
,batch_status
,batch_cancel
,batch_list
, andbatch_result
functions to manage batch queries accordingly to OpenAi API specification. - Added
create_jsonl_records
, andwrite_jsonl_files
functions to compose 'jsonl' files useful for batch queries accordingly to API specification. Model's options are available like forquery_gpt
,gpt_query_on_column
, andget_completion_from_messages
.
- Changed name and repo to 'CorradoLanera/gpteasyr'.
- Added
setup_py
function to setup python backend. - update
README
- Added
use_py
argument togpt_query
,gpt_query_on_column
, andget_completion_from_messages
- Added
closing
argument tocompose_usr_prompt
,compose_prompt
, andcreate_usr_data_prompter
functions, to allow add text at the very end of the prompt, i.e., after the embedded text.
- Added seed argument to
gpt_query
,gpt_query_on_column
, andget_completion_from_messages
functions.
- Now
create_usr_data_prompter
can accept a custom delimiter. - Default delimiter changed from four quotes (
""""
) to three quotes ("""
).
stream = FALSE
hard coded (for the moment) onget_completion_from_messages
.- column name for results in
gpt_query_on_columns
is now customizable. - Now
gpt_query_on_columns
returns the original tibble with the column added to it, including an optionadd
to return the result as a new tibble with a single column only (whenadd = FALSE
). - Add progress bar to
gpt_query_on_column
functions.
- hot-fix old calls to
match.arg(model)
ingpt_query
andgpt_query_on_column
functions.
- Add option to return NA when the API returns an error; this apply on
gpt_query
andgpt_query_on_column
functions only (i.e., not to the baseget_completion_from_messages
function).
- Removed dependency from
{openai}
in favor of{httr}
and{jsonlite}
directly - Now queries can be made to personalized endpoints.
- create_usr_data_prompter now works with empty characters (treated as NULL).
- Now compose_prompt_api correctly manage empty prompts.
- 100% coverage passed
- Activated all tests on CI
- All functions tested.
- Prompt compositors (i.e.,
compose_prompt
,compose_usr_prompt
,compose_sys_prompt
, andcreate_usr_data_prompter
) now always return a character vector (possibly of length 0). query_gpt_on_column
now acceptssys_prompt
andusr_prompt
arguments to customize the user and system prompts. (fix #1)- Changed functions names to more uniform. I.e.,
compose_prompt_user
andcompose_prompt_system
now are calledcompose_usr_prompt
andcompose_sys_prompt
; whileusr_msg
andsys_msg
arguments now are calledusr_prompt
andsys_prompt
. (fix #2) - Added
zzz.R
with startup messages checking for API keys. - Update README with examples of usage.
- Setup development environment.
- Initial setup from CorradoLanera/gpt-template.