应用平台 APPSTAGE-PromptTemplate:接口调用

时间:2024-09-05 17:26:51

接口调用

PromptTemplate.from_template

  • 参数说明
    表2 参数说明

    参数名称

    参数类型

    是否必选

    参数描述

    template

    str

    True

    提示语模板

    template_format

    str

    False

    提示语模板格式,支持f-string、jinja2两种。默认f-string

    partial_variable

    dict

    False

    格式化模板的部分变量

  • 返回值:PromptTemplate object
support.huaweicloud.com/sdkreference-appstage/appstage_08_0094.html