agsamantha/node_modules/@langchain/community/dist/utils/tencent_hunyuan/common.js
2024-10-02 15:15:21 -05:00

9 lines
372 B
JavaScript

export const service = "hunyuan";
export const signedHeaders = `content-type;host`;
export const getDate = (timestamp) => {
const date = new Date(timestamp * 1000);
const year = date.getUTCFullYear();
const month = `0${(date.getUTCMonth() + 1).toString()}`.slice(-2);
const day = `0${date.getUTCDate()}`.slice(-2);
return `${year}-${month}-${day}`;
};