Skip to content

Commit

Permalink
v2.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
samestrin committed Jun 24, 2024
1 parent 3325ee0 commit 1210b02
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "llm-interface",
"version": "2.0.2",
"version": "2.0.3",
"main": "src/index.js",
"description": "A simple, unified interface for integrating and interacting with multiple Large Language Model (LLM) APIs, including OpenAI, AI21 Studio, Anthropic, Cloudflare AI, Cohere, Fireworks AI, Google Gemini, Goose AI, Groq, Hugging Face, Mistral AI, Perplexity, Reka AI, and LLaMA.cpp.",
"type": "commonjs",
"scripts": {
"test": "jest"
"test": "jest",
"prettier": "prettier --write \"src/**/*.js\""
},
"keywords": [
"llm",
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/ai21.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { adjustModelAlias, getModelByAlias } = require('../utils/config.js');
const { getFromCache, saveToCache } = require('../utils/cache.js');
const { getSimpleMessageObject } = require('../utils/utils.js');
const { ai21ApiKey } = require('../config/config.js');
const { getConfig } = require('../utils/configManager.js');
const { getConfig } = require('../../src/utils/configManager.js');
const config = getConfig();

const log = require('loglevel');
Expand Down
5 changes: 4 additions & 1 deletion test/basic/ai21.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const {
options,
expectedMaxLength,
} = require('../../src/utils/defaults.js');
const { safeStringify } = require('../../src/utils/jestSerializer.js');

describe('AI21 Basic', () => {
if (ai21ApiKey) {
Expand All @@ -35,7 +36,9 @@ describe('AI21 Basic', () => {
],
};

response = await ai21.sendMessage(message, options);
try { response = await ai21.sendMessage(message, options);} catch (error) {
throw new Error(`Test failed: ${safeStringify(error)}`);
}
expect(typeof response).toStrictEqual('object');
});

Expand Down
1 change: 1 addition & 0 deletions test/basic/gemini.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const {
expectedMaxLength,
} = require('../../src/utils/defaults.js');
const { safeStringify } = require('../../src/utils/jestSerializer.js');

describe('Gemini Basic', () => {
if (geminiApiKey) {
let response;
Expand Down

0 comments on commit 1210b02

Please sign in to comment.