mirror of
https://github.com/BoardWare-Genius/jarvis-models.git
synced 2025-12-14 00:53:25 +00:00
feat: text_and_image blockbox
This commit is contained in:
@ -22,7 +22,7 @@ class G2E(Blackbox):
|
||||
if context == None:
|
||||
context = []
|
||||
url = 'http://120.196.116.194:48890/v1'
|
||||
|
||||
#url = 'http://120.196.116.194:48892/v1'
|
||||
|
||||
background_prompt = '''KOMBUKIKI是一款茶饮料,目标受众 年龄:20-35岁 性别:女性 地点:一线城市、二线城市 职业:精英中产、都市白领 收入水平:中高收入,有一定消费能力 兴趣和爱好:注重健康,有运动习惯
|
||||
|
||||
@ -47,8 +47,11 @@ class G2E(Blackbox):
|
||||
|
||||
|
||||
prompt_template = [
|
||||
{"role": "system", "content": background_prompt + prompt1},
|
||||
{"role": "system", "content": background_prompt + prompt1},
|
||||
]
|
||||
#prompt_template = [
|
||||
# {"role": "system", "content": ''},
|
||||
#]
|
||||
|
||||
|
||||
messages = prompt_template + context + [
|
||||
@ -61,8 +64,8 @@ class G2E(Blackbox):
|
||||
api_key='YOUR_API_KEY',
|
||||
base_url=url
|
||||
)
|
||||
|
||||
model_name = client.models.list().data[0].id
|
||||
print(model_name)
|
||||
response = client.chat.completions.create(
|
||||
model=model_name,
|
||||
messages=messages,
|
||||
|
||||
Reference in New Issue
Block a user