明树Git Lab

Commit dd51d9d2 authored by zfp1's avatar zfp1

update

parent 28506bce
...@@ -30,7 +30,7 @@ app.post('/wechat', async (req, res) => { ...@@ -30,7 +30,7 @@ app.post('/wechat', async (req, res) => {
const result = await xml2js.parseStringPromise(req.body); const result = await xml2js.parseStringPromise(req.body);
const message = result.xml.Content[0]; const message = result.xml.Content[0];
const fromUser = result.xml.FromUserName[0]; const fromUser = result.xml.FromUserName[0];
console.log(message, "------------------")
// API调用 [5]() // API调用 [5]()
const completion = await openai.chat.completions.create({ const completion = await openai.chat.completions.create({
model: "deepseek-chat", model: "deepseek-chat",
...@@ -71,7 +71,7 @@ app.post('/wechat', async (req, res) => { ...@@ -71,7 +71,7 @@ app.post('/wechat', async (req, res) => {
<Content><![CDATA[${fullContent}]]></Content> <Content><![CDATA[${fullContent}]]></Content>
</xml> </xml>
`; `;
console.log(xml2js.ValidationError(responseXML))
res.set('Content-Type', 'text/xml'); res.set('Content-Type', 'text/xml');
console.log(responseXML) console.log(responseXML)
res.send(responseXML); res.send(responseXML);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment