Feature #3643
Updated by Ram Kordale 5 months ago
Add version, template_dict, attachments and 'core arguments' as arguments.
if version is not 1.0, return unsupported version error.
replace template_dict[key] in final prompt with template_dict[value].
'attachments' is a list of GCS files. Attach these to the message.
'core arguments' are "temperature", "max_tokens", "top_p", "frequency_penalty", and "presence_penalty" which are directly used as arguments to the openai api.
Minimum Test I:
- version is 1.2; return error
Minimum Test II:
- version not given. assume, it is version 1.0
- create a jpg file containing only "Let there be universal peace.". upload it as GCS file.
- create another jpg file containing only "Let there be happiness all around!". upload it as GCS file.
- set prompt to "Tell what is written in the two uploaded files. Then, write fantastic"
- template_dict[key]="fantastic", template_dict[value]="Super"
Response should be "Let there be universal peace. Let there be happiness all around! Super"