热点新闻
function-call测试
2024-11-13 20:23  浏览:1023  搜索引擎搜索“混灰机械网”
温馨提示:信息一旦丢失不一定找得到,请务必收藏信息以备急用!本站所有信息均是注册会员发布如遇到侵权请联系文章中的联系方式或客服删除!
联系我时,请说明是在混灰机械网看到的信息,谢谢。
展会发布 展会网站大全 报名观展合作 软文发布

目前各家大模型厂商的API接口,基本上都是参照openai的接口格式,所以不管是chat/compelete,还是function-call接口
格式都是一样的,这个给不同厂家的对比测试还是带来了很多的方便。
综合看起来,目前glm,baichuan,kimi的function-call能力都差不多,deepseek稍微差一点。
比如

[ { "type": "function", "function": { "name": "sec_daily_price", "description": "获取股票资产的日度行情数据,包含每日收盘价、不同区间的区间涨跌幅", "parameters": { "type": "object", "properties": { "security_name": { "type": "string", "description": "资产简称,资产包含股票、商品期货指数、行业指数、主题指数、大盘指数、策略指数等", "examples": [ "贵州茅台", "光伏设备", "上证指数", "人工智能", "白银" ] }, "trade_date": { "type": "string", "description": "只需要单天数据时填入单个交易日期,格式为 'YYYYMMDD',可以省略不填", "examples": [ "20241029" ] }, "start_date": { "type": "string", "description": "区间日期的起始日期,格式为 'YYYYMMDD',可以省略不填", "examples": [ "20241029" ] }, "end_date": { "type": "string", "description": "区间日期的终止日期,格式为 'YYYYMMDD',可以省略不填", "examples": [ "20241029" ] }, "metric_name": { "type": "string", "description": "行情指标,可选值为 'close_price', 'price_chg', 'price_chg_1w', 'price_chg_1m', 'price_chg_3m'。'close_price': 单日收盘价;'price_chg': 当日涨跌幅;'price_chg_1w': 近一周涨跌幅;''price_chg_1m': 近一月涨跌幅; 'price_chg_3m': 近3月涨跌幅。可填入多个指标名,使用','隔开", "enum": [ "close_price", "price_chg", "price_chg_1w", "price_chg_1m", "price_chg_3m" ] } }, "required": [ "security_name", "metric_name" ] } } }, { "type": "function", "function": { "name": "get_stock_valuation", "description": "获取股票的各类估值指标,包含P/E市盈率、P/B市净率、P/S市销率、股息率", "parameters": { "type": "object", "properties": { "stock_name": { "type": "string", "description": "股票简称", "examples": [ "贵州茅台", "士兰微", "药明康德" ] }, "trade_date": { "type": "string", "description": "只需要单天数据时填入单个交易日期,格式为 'YYYYMMDD',可以省略不填", "examples": [ "20241029" ] }, "start_date": { "type": "string", "description": "区间日期的起始日期,格式为 'YYYYMMDD',可以省略不填", "examples": [ "20241029" ] }, "end_date": { "type": "string", "description": "区间日期的终止日期,格式为 'YYYYMMDD',可以省略不填", "examples": [ "20241029" ] }, "metric_name": { "type": "string", "description": "估值指标,可选值为 'pe', 'pb', 'ps', 'dividend_yield'。'pe': 市盈率 (Price-to-Earnings Ratio);'pb': 市净率 (Price-to-Book Ratio);'ps': 市销率 (Price-to-Sales Ratio);'dividend_yield':股息率。可填入多个指标名,使用','隔开", "enum": [ "pe", "pb", "ps" ] } }, "required": [ "stock_name", "metric_name" ] } } }, { "type": "function", "function": { "name": "get_stock_capitalflow", "description": "获取指定股票在特定交易日的资金面数据", "parameters": { "type": "object", "properties": { "stock_name": { "type": "string", "description": "股票简称", "examples": [ "贵州茅台", "士兰微", "药明康德" ] }, "trade_date": { "type": "string", "description": "只需要单天数据时填入单个交易日期,格式为 'YYYYMMDD',可以省略不填", "examples": [ "20241029" ] }, "start_date": { "type": "string", "description": "区间日期的起始日期,格式为 'YYYYMMDD',可以省略不填", "examples": [ "20241029" ] }, "end_date": { "type": "string", "description": "区间日期的终止日期,格式为 'YYYYMMDD',可以省略不填", "examples": [ "20241029" ] }, "metric_name": { "type": "string", "description": "资金面指标名称,可选值为 'net_cash_flow', 'trade_volume', 'circulating_market_cap', 'total_market_cap'。'net_cash_flow': 净资金流入; 'trade_volume': 当日交易额; 'circulating_market_cap': 流通市值; 'total_market_cap': 总市值。可填入多个指标名,使用','隔开", "enum": [ "net_cash_flow", "trade_volume", "circulating_market_cap", "total_market_cap" ] } }, "required": [ "stock_name", "metric_name" ] } } }, { "type": "function", "function": { "name": "get_stock_income_statement", "description": "获取指定股票在特定财报报告期的利润表财务数据", "parameters": { "type": "object", "properties": { "stock_name": { "type": "string", "description": "股票简称", "examples": [ "贵州茅台", "士兰微", "药明康德" ] }, "report_date": { "type": "string", "description": "财报日期,格式为 'YYYYMMDD',无特殊要求时省略不填。如填写请选择任何一个季度的最后一天的日期,分别代表一季报'YYYY0331'、半年报'YYYY0630'、三季报'YYYY0930'、年报'YYYY1231'", "examples": [ "20240930" ] }, "metric_name": { "type": "string", "description": "利润表财务指标名称,可选值为 'revenue', 'net_profit', 'net_profit_margin', 'revenue_yoy', 'net_profit_yoy', 'net_profit_margin_yoy', 'eps'。'revenue': 营业收入,'net_profit': 归母净利润,'net_profit_margin': 净利率,'revenue_yoy': 营业收入同比变动,'net_profit_yoy': 归母净利润同比变动,'net_profit_margin_yoy': 净利率同比变动,'eps': 每股收益(EPS)。可填入多个指标名,使用','隔开", "enum": [ "revenue", "net_profit", "net_profit_margin", "revenue_yoy", "net_profit_yoy", "net_profit_margin_yoy", "eps" ] } }, "required": [ "stock_name", "metric_name" ] } } }, { "type": "function", "function": { "name": "get_stock_balance_sheet", "description": "获取指定股票在特定财报报告期的资产负债表财务数据", "parameters": { "type": "object", "properties": { "stock_name": { "type": "string", "description": "股票简称", "examples": [ "贵州茅台", "士兰微", "药明康德" ] }, "report_date": { "type": "string", "description": "财报日期,格式为 'YYYYMMDD',无特殊要求时省略不填。如填写请选择任何一个季度的最后一天的日期,分别代表一季报'YYYY0331'、半年报'YYYY0630'、三季报'YYYY0930'、年报'YYYY1231'", "examples": [ "20240930" ] }, "metric_name": { "type": "string", "description": "资产负债表财务指标名称,可选值为'total_assets', 'total_liabilities', 'debt_to_assets'。'total_assets': 总资产,'total_liabilities': 总负债,'debt_to_assets': 资产负债率(总负债/总资产)。可填入多个指标名,使用','隔开", "enum": [ "total_assets", "total_liabilities", "debt_to_assets" ] } }, "required": [ "stock_name", "metric_name" ] } } } ]

发布人:7212****    IP:124.223.189***     举报/删稿
展会推荐
让朕来说2句
评论
收藏
点赞
转发