Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | prompt_tokens | = | 0 | ||
integer, | public | :: | completion_tokens | = | 0 | ||
integer, | public | :: | total_tokens | = | 0 |
procedure, private :: print_prompt_tokens | |
procedure, private :: print_completion_tokens | |
procedure, private :: print_total_tokens | |
procedure, public :: print => print_usage |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=:), | public, | allocatable | :: | role | |||
character(len=:), | public, | allocatable | :: | content | |||
character(len=:), | public, | allocatable | :: | name |
procedure, private :: deallocate_role | |
procedure, private :: deallocate_content | |
procedure, private :: deallocate_name | |
procedure, public :: finalize => deallocate_ChatCompletion_messages | |
procedure, public :: set => set_message | |
procedure, private :: set_role | |
procedure, private :: set_content | |
procedure, private :: set_name |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=:), | public, | allocatable | :: | organization | |||
character(len=:), | public, | allocatable | :: | api_key | |||
character(len=:), | public, | allocatable | :: | file_name | |||
character(len=14), | public | :: | api_key_env | = | 'OPENAI_API_KEY' | ||
character(len=10), | public | :: | organization_env | = | 'OPENAI_ORG' | ||
character(len=:), | public, | allocatable | :: | url | |||
character(len=:), | public, | allocatable | :: | model | |||
character(len=:), | public, | allocatable | :: | user_name | |||
character(len=256), | public, | allocatable | :: | model_list(:) | |||
type(ChatCompletion_messages), | public, | allocatable | :: | messages(:) | |||
integer, | public | :: | max_tokens | ||||
type(usage), | public | :: | usage | ||||
real, | public | :: | temperature | = | 1.0 | ||
real, | public | :: | presence_penalty | = | 0.0 | ||
real, | public | :: | frequency_penalty | = | 0.0 | ||
real, | public | :: | top_p | = | 1.0 | ||
logical, | public | :: | stream | = | .false. | ||
integer, | public | :: | n | = | 1 | ||
character(len=:), | public, | allocatable | :: | finish_reason |
procedure, public :: load_base_data | |
procedure, public :: print_api_key | |
procedure, public :: print_organization | |
procedure, public :: print_file_name | |
procedure, public :: set_file_name | |
procedure, public :: set_base_data | |
procedure, public :: check => check_chat_completion | |
procedure, public :: create => create_chat_completion | |
procedure, public :: conversation | |
procedure, private :: deallocate_messages | |
procedure, private :: deallocate_model_list | |
procedure, private :: deallocate_url | |
procedure, private :: deallocate_model | |
procedure, private :: deallocate_user_name | |
procedure, private :: deallocate_finish_reason | |
procedure, public :: finalize => deallocate_ChatCompletion | |
procedure, private :: get_assistant_response | |
procedure, private :: get_user_message | |
procedure, public :: init_messages | |
procedure, private :: load => load_ChatCompletion_data | |
procedure, private :: load_user_name | |
procedure, private :: load_url | |
procedure, private :: load_model | |
procedure, private :: load_temperature | |
procedure, private :: load_presence_penalty | |
procedure, private :: load_frequency_penalty | |
procedure, private :: load_top_p | |
procedure, private :: load_n | |
procedure, private :: load_stream | |
procedure, private :: load_max_tokens | |
procedure, private :: read_user_message | |
procedure, private :: print_user_name | |
procedure, private :: print_model_list | |
procedure, private :: print_model | |
procedure, private :: print_temperature | |
procedure, private :: print_presence_penalty | |
procedure, private :: print_frequency_penalty | |
procedure, private :: print_top_p | |
procedure, private :: print_n | |
procedure, private :: print_stream | |
procedure, private :: print_max_tokens | |
procedure, public :: print_user_message | |
procedure, public :: print_assistant_response | |
procedure, private :: set_user_name | |
procedure, private :: set_url | |
procedure, private :: set_model | |
procedure, private :: set_model_list | |
procedure, private :: select_model | |
procedure, private :: set_temperature | |
procedure, private :: set_presence_penalty | |
procedure, private :: set_frequency_penalty | |
procedure, private :: set_top_p | |
procedure, private :: set_n | |
procedure, private :: set_stream | |
procedure, private :: set_max_tokens | |
procedure, private :: set_asisstant_response | |
procedure, private :: set_user_message | |
procedure, public :: set => set_ChatCompletion_data | |
procedure, private :: write_history | |
procedure, private :: print_finish_reason |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(in) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(in) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(usage), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this | |||
character(len=*), | intent(in), | optional | :: | file_name | ||
character(len=*), | intent(in), | optional | :: | url | ||
character(len=*), | intent(in), | optional | :: | model | ||
character(len=*), | intent(in), | optional | :: | user_name | ||
real, | intent(in), | optional | :: | temperature | ||
real, | intent(in), | optional | :: | presence_penalty | ||
real, | intent(in), | optional | :: | frequency_penalty | ||
real, | intent(in), | optional | :: | top_p | ||
integer, | intent(in), | optional | :: | n | ||
logical, | intent(in), | optional | :: | stream | ||
integer, | intent(in), | optional | :: | max_tokens |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this | |||
character(len=*), | intent(in) | :: | message |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this | |||
character(len=*), | intent(in) | :: | response |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this | |||
character(len=*), | intent(in) | :: | file_name_base | |||
character(len=*), | intent(in) | :: | file_name_ChatCompletion | |||
character(len=*), | intent(in) | :: | input_file | |||
character(len=*), | intent(in) | :: | output_file | |||
character(len=*), | intent(in) | :: | inputfile_command | |||
character(len=*), | intent(in) | :: | exit_command |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this | |||
character(len=*), | intent(in) | :: | file_name |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this | |||
character(len=*), | intent(in) | :: | file_name | |||
character(len=*), | intent(in) | :: | command |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion_messages), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this | |||
character(len=*), | intent(in) | :: | file_name |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion_messages), | intent(inout) | :: | this | |||
character(len=*), | intent(in) | :: | role | |||
character(len=*), | intent(in) | :: | content | |||
character(len=*), | intent(in), | optional | :: | name |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this | |||
real, | intent(in) | :: | temperature |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this | |||
real, | intent(in) | :: | presence_penalty |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this | |||
real, | intent(in) | :: | frequency_penalty |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this | |||
real, | intent(in) | :: | top_p |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this | |||
integer, | intent(in) | :: | n |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this | |||
logical, | intent(in) | :: | stream |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this | |||
character(len=*), | intent(in) | :: | url |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this | |||
character(len=*), | intent(in) | :: | model |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this | |||
integer, | intent(in) | :: | n |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion_messages), | intent(inout) | :: | this | |||
character(len=*), | intent(in) | :: | role |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion_messages), | intent(inout) | :: | this | |||
character(len=*), | intent(in) | :: | content |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion_messages), | intent(inout) | :: | this | |||
character(len=*), | intent(in) | :: | name |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this | |||
integer, | intent(out) | :: | error |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion_messages), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion_messages), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion_messages), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this | |||
integer, | intent(in) | :: | n |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this | |||
integer, | intent(in) | :: | max_tokens |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this | |||
character(len=*), | intent(in) | :: | user_name |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(usage), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(usage), | intent(inout) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(usage), | intent(inout) | :: | this |