New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ffaivideo

Package Overview
Dependencies
Maintainers
0
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ffaivideo - npm Package Compare versions

Comparing version 1.1.7 to 1.1.8

1

dist/config/config.d.ts

@@ -22,2 +22,3 @@ import { LLMConfig } from './llm-config';

g4f?: LLMConfig;
customAI?: LLMConfig;
pexels?: MaterialSite;

@@ -24,0 +25,0 @@ videoScript?: string;

47

dist/llm.js

@@ -14,32 +14,27 @@ "use strict";

const getLLMConfig = (config) => {
let llmConfig = { ...config.defalut };
const provider = config.provider.toLowerCase();
switch (provider) {
case 'moonshot':
llmConfig = { ...llmConfig, ...config.moonshot };
break;
case 'openai':
llmConfig = { ...llmConfig, ...config.openai };
break;
case 'azure':
llmConfig = { ...llmConfig, ...config.azure };
break;
case 'gemini':
llmConfig = { ...llmConfig, ...config.gemini };
break;
case 'g4f':
llmConfig = { ...llmConfig, ...config.g4f };
break;
default:
throw new Error('llm provider is not set, please set it in the config file.');
let llmConfig = { ...config.default };
const providerConfigs = {
moonshot: config.moonshot,
openai: config.openai,
azure: config.azure,
gemini: config.gemini,
g4f: config.g4f,
custom: config.customAI,
};
if (provider in providerConfigs) {
const providerConfig = providerConfigs[provider];
if (providerConfig) {
llmConfig = { ...llmConfig, ...providerConfig };
}
}
if (llmConfig.apiKey == '') {
throw new Error(`${provider}: api_key is not set, please set it in the config file.`);
else {
throw new Error('LLM provider is not set in the config file.');
}
if (llmConfig.modelName == '') {
throw new Error(`${provider}: model_name is not set, please set it in the config file.`);
const requiredFields = ['apiKey', 'modelName', 'baseUrl'];
for (const field of requiredFields) {
if (!llmConfig[field]) {
throw new Error(`${provider}: ${field} is not set in the config file.`);
}
}
if (llmConfig.baseUrl == '') {
throw new Error(`${provider}: base_url is not set, please set it in the config file.`);
}
return llmConfig;

@@ -46,0 +41,0 @@ };

{
"name": "ffaivideo",
"version": "1.1.7",
"version": "1.1.8",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc