Local branch had diverged from origin/master (sibling commits on the same base). Rewrote local history linearly on top of origin/master, folding in all local content: exa/hot-platform discovery hunters, leaks ledger, nightly sweep orchestrator, updated .gitignore and skill docs, plus the latest hunt output and vault state. Remote-only files (vault keys, channel scripts) were restored rather than dropped, so the resulting tree is a full union of both sides.
1 line
2.6 KiB
JSON
1 line
2.6 KiB
JSON
{"repo": "aviyadav22/paralegalai", "files": {"server/utils/agents/aibitat/providers/deepseek.js": {"095e81d422261e5f5cf36c8b8df73ea6b9b6794e": {"t": 1786068271.3569891, "n": 2297, "h": "323613a5e7b87137", "c": "const OpenAI = require(\"openai\");\nconst Provider = require(\"./ai-provider.js\");\nconst InheritMultiple = require(\"./helpers/classes.js\");\nconst UnTooled = require(\"./helpers/untooled.js\");\nconst { toValidNumber } = require(\"../../../http/index.js\");\n\nclass DeepSeekProvider extends InheritMultiple([Provider, UnTooled]) {\n model;\n\n constructor(config = {}) {\n super();\n const { model = \"deepseek-chat\" } = config;\n const client = new OpenAI({\n baseURL: \"https://api.deepseek.com/v1\",\n apiKey: process.env.DEEPSEEK_API_KEY ?? null,\n maxRetries: 3,\n });\n\n this._client = client;\n this.model = model;\n this.verbose = true;\n this.maxTokens = process.env.DEEPSEEK_MAX_TOKENS\n ? toValidNumber(process.env.DEEPSEEK_MAX_TOKENS, 1024)\n : 1024;\n }\n\n get client() {\n return this._client;\n }\n\n get supportsAgentStreaming() {\n return true;\n }\n\n async #handleFunctionCallChat({ messages = [] }) {\n return await this.client.chat.completions\n .create({\n model: this.model,\n messages,\n max_tokens: this.maxTokens,\n })\n .then((result) => {\n if (!result.hasOwnProperty(\"choices\"))\n throw new Error(\"DeepSeek chat: No results!\");\n if (result.choices.length === 0)\n throw new Error(\"DeepSeek chat: No results length!\");\n return result.choices[0].message.content;\n })\n .catch((_) => {\n return null;\n });\n }\n\n async #handleFunctionCallStream({ messages = [] }) {\n return await this.client.chat.completions.create({\n model: this.model,\n stream: true,\n messages,\n });\n }\n\n async stream(messages, functions = [], eventHandler = null) {\n return await UnTooled.prototype.stream.call(\n this,\n messages,\n functions,\n this.#handleFunctionCallStream.bind(this),\n eventHandler\n );\n }\n\n async complete(messages, functions = []) {\n return await UnTooled.prototype.complete.call(\n this,\n messages,\n functions,\n this.#handleFunctionCallChat.bind(this)\n );\n }\n\n /**\n * Get the cost of the completion.\n *\n * @param _usage The completion to get the cost for.\n * @returns The cost of the completion.\n */\n getCost(_usage) {\n return 0;\n }\n}\n\nmodule.exports = DeepSeekProvider;\n"}}}} |