'use strict';
import { createDeepInfra } from '@ai-sdk/deepinfra';
import { generateText, streamText } from 'ai';
import 'dotenv/config';
import { getStringEnvSetting } from '../../../fd-toolbox/infra/env-functions.js';
import { envSettingKeys } from '../../common/infra/env-setting-keys.js';

var __defProp=Object['defineProperty'],__name=(_0x5dab40,_0x1b90bd)=>__defProp(_0x5dab40,'name',{'value':_0x1b90bd,'configurable':!![]});const deepinfra=createDeepInfra({'apiKey':getStringEnvSetting(envSettingKeys['aiApiKey'])??void(0x4c+-0x1b3d+0x1*0x1af1)});async function getAiDeepInfraGeneratedText(_0x11c266){const _0x4eba4f=await generateText({'model':deepinfra(getStringEnvSetting(envSettingKeys['aiModelName'])??''),'prompt':_0x11c266['prompt'],'system':_0x11c266['systemPrompt'],'tools':_0x11c266['tools']});return _0x4eba4f;}__name(getAiDeepInfraGeneratedText,'getAiDeepInfraGeneratedText');async function getAiDeepInfraStreamText(_0x14304c){const _0x721b12=streamText({'model':deepinfra(getStringEnvSetting(envSettingKeys['aiModelName'])??''),'prompt':_0x14304c['prompt'],'system':_0x14304c['systemPrompt'],'tools':_0x14304c['tools']});return _0x721b12;}__name(getAiDeepInfraStreamText,'getAiDeepInfraStreamText');

export { getAiDeepInfraGeneratedText, getAiDeepInfraStreamText };
