π₯ BackEnd : Proxy Server - Born-in-Idiots/ARTIFY GitHub Wiki
BackEnd Proxy Server
1. BE <-> BE_p Interface API
(1). API Input
{
'info': {
'language': {
'from': 'en',
'to': 'ko'
},
'params': {
'OPENAI_API_KEY': 'user_openai_api_key',
'temperature': 0.0,
'top_p': 0.1,
'frequency_penalty': 1.0,
'presence_penalty': 0.0
},
'template': 'sample_template',
'template_variable': 'sample_user_instruction'
}
}
(2). API Output
{
'uuid' : 'unique key',
'content' : {
'before' : 'user instruction',
'after' : 'translated user instruction'
}
}
Example
(1). API Input Example
{
'language': {
'from': 'KOREAN',
'to': 'ENGLISH'
},
'params': {
'OPENAI_API_KEY': '__personal_openai_api_key__',
'temperature': 0.0,
'top_p': 1.0,
'frequency_penalty': 0.5,
'presence_penalty': 0.5
},
'template': '''Please translation followings:
{passage}
yours:''',
'template_variable': {
βpasssageβ : βμ λμμΈμ μ μ¨λ° μ΄λ κ² μ΄λ €μ΄κ±°μΌβ
}
}
(2). API Output Example
{
'uuid' : '__unique key__',
'content' : {
'before' : '''Please translation followings:
μ λμμΈμ μ μ¨λ° μ΄λ κ² μ΄λ €μ΄κ±°μΌ
yours:''',
'after' : 'ah.. why the task of design is too fucking hard'
}
}