参考文献的作者数变成6
This commit is contained in:
@@ -82,14 +82,8 @@ class References extends Base
|
||||
if(!empty($aRefer['doilink'])){
|
||||
$sAuthor = empty($aRefer['author']) ? '' : trim(trim($aRefer['author']),'.');
|
||||
if(!empty($sAuthor)){
|
||||
$aAuthor = explode(',', $sAuthor);
|
||||
if(count($aAuthor) > 3){
|
||||
$sAuthor = implode(',', array_slice($aAuthor, 0,3));
|
||||
$sAuthor .= ', et al';
|
||||
}
|
||||
if(count($aAuthor) <= 3 ){
|
||||
$sAuthor = implode(',', $aAuthor);
|
||||
}
|
||||
//作者不超过 6 个全部列出,超过则只列前 3 个加 et al
|
||||
$sAuthor = \app\common\AuthorListFormatter::format($sAuthor);
|
||||
}
|
||||
//文章标题
|
||||
$sTitle = empty($aRefer['title']) ? '' : trim(trim($aRefer['title']),'.');
|
||||
@@ -116,14 +110,8 @@ class References extends Base
|
||||
if($aRefer['refer_type'] == 'book'){
|
||||
$sAuthor = empty($aRefer['author']) ? '' : trim(trim($aRefer['author']),'.');
|
||||
if(!empty($sAuthor)){
|
||||
$aAuthor = explode(',', $sAuthor);
|
||||
if(count($aAuthor) > 3){
|
||||
$sAuthor = implode(',', array_slice($aAuthor, 0,3));
|
||||
$sAuthor .= ', et al';
|
||||
}
|
||||
if(count($aAuthor) <= 3 ){
|
||||
$sAuthor = implode(',', $aAuthor);
|
||||
}
|
||||
//作者不超过 6 个全部列出,超过则只列前 3 个加 et al
|
||||
$sAuthor = \app\common\AuthorListFormatter::format($sAuthor);
|
||||
}
|
||||
//文章标题
|
||||
$sTitle = empty($aRefer['title']) ? '' : trim(trim($aRefer['title']),'.');
|
||||
@@ -1214,7 +1202,7 @@ class References extends Base
|
||||
$sSysMessagePrompt = '请完成以下任务:
|
||||
1. 根据提供的DOI号,查询该文献的AMA引用格式;
|
||||
2. 按照以下规则调整AMA引用格式:
|
||||
- 第三个作者名字后添加 et al.;
|
||||
- 作者不超过6个时全部列出;超过6个时只保留前3个作者,并在第三个作者名字后添加 et al.;
|
||||
- DOI前加上"Available at: ";
|
||||
- DOI信息格式调整为"https://doi.org/+真实DOI"(替换真实DOI为文献实际DOI).
|
||||
3. 严格按照以下JSON结构返回结果,仅返回JSON数据,不要额外文字,包含字段:doilink(url格式)、title(标题)、author(作者数组)、joura(出版社名称)、dateno(年;卷(期):起始页-终止页),is_ai_check(默认1)
|
||||
|
||||
Reference in New Issue
Block a user