api/expert_manage/getList 加国家筛选
解析简历信息
This commit is contained in:
@@ -120,6 +120,35 @@ class LLMService
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用对话请求(与参考文献校对共用 postChat / [promotion] 配置)
|
||||
*
|
||||
* @param array $messages OpenAI messages
|
||||
* @param float $temperature
|
||||
* @return string|null 助手回复正文
|
||||
*/
|
||||
public function requestChat(array $messages, $temperature = 0)
|
||||
{
|
||||
if ($this->url === '' || $this->model === '') {
|
||||
\think\Log::warning('LLM requestChat: url or model not configured');
|
||||
return null;
|
||||
}
|
||||
$payload = [
|
||||
'model' => $this->model,
|
||||
'temperature' => $temperature,
|
||||
'messages' => $messages,
|
||||
];
|
||||
return $this->postChat($payload);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析模型返回的 JSON 对象(去除 markdown 代码块等)
|
||||
*/
|
||||
public function parseJsonResponse($raw)
|
||||
{
|
||||
return $this->parseJson($raw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析 can_support;兼容 is_match 字段
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user