gpt和llama的推理prompt

gpt和llama的推理prompt

    正在检查是否收录...

gpt

completion = openai.ChatCompletion.create( # model="gpt-3.5-turbo", model='gpt-4', messages=[ { "role": "system", "content": ''' You are a helpful assistant ... ''' }, { "role": "user", "content": f''' The input question is:{question} For example, your answer should be like this: ... ''' } ]) print(completion.choices[0].message["content"]) 

llama

query=f''' <s>[INST] <<SYS>> As an intelligent robot ...<</SYS>> The input question is:{question} For example, your answer should be like this: ... [/INST] ''' output = generate_text(query) print(output[0]['generated_text'].replace(query,'').strip()) 

prompt engineering: https://www.promptingguide.ai/

codegptprompttpuassistantgpt-3.5intelcreateintelligentlcmguigpt-4stemidellamabotchatgpt-3openaiurl
  • 本文作者:WAP站长网
  • 本文链接: https://wapzz.net/post-7316.html
  • 版权声明:本博客所有文章除特别声明外,均默认采用 CC BY-NC-SA 4.0 许可协议。
本站部分内容来源于网络转载,仅供学习交流使用。如涉及版权问题,请及时联系我们,我们将第一时间处理。
文章很赞!支持一下吧 还没有人为TA充电
为TA充电
还没有人为TA充电
0
0
  • 支付宝打赏
    支付宝扫一扫
  • 微信打赏
    微信扫一扫
感谢支持
文章很赞!支持一下吧
关于作者
2.8W+
9
1
2
WAP站长官方

数据安全:保障ChatGPT与AIGC的数据安全

上一篇

搭建AI问答和AI绘画小程序都需要做什么?

下一篇
  • 复制图片
按住ctrl可打开默认菜单