@re-ai/free-api
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -64,2 +64,3 @@ "use strict"; | ||
const data = response; | ||
Logger_1.Logger.debug("dify response data: ", data); | ||
return { | ||
@@ -78,3 +79,3 @@ id: data.message_id, | ||
object: "chat.completion", | ||
usage: data.usage || undefined | ||
usage: data.metadata.usage || data.usage || undefined | ||
}; | ||
@@ -81,0 +82,0 @@ } |
{ | ||
"name": "@re-ai/free-api", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -74,2 +74,3 @@ import { IAIApi } from "../interfaces/IAIApi"; | ||
const data = response as DIFYChatCompletionResponse | ||
Logger.debug("dify response data: ", data) | ||
return { | ||
@@ -88,3 +89,3 @@ id: data.message_id, | ||
object: "chat.completion", | ||
usage: data.usage || undefined | ||
usage: data.metadata.usage || data.usage || undefined | ||
} as ChatCompletionResponse | ||
@@ -91,0 +92,0 @@ } else { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53983
1498