Skip to content

Commit

Permalink
Merge pull request #125 from A-F-V/Build-on-PR
Browse files Browse the repository at this point in the history
```
  • Loading branch information
A-F-V authored Dec 3, 2024
2 parents b4466ca + 8b7545f commit 8753a1d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 15 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Lint and Test

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
lint-and-test:
Expand All @@ -16,7 +13,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
node-version: '22.x'

- name: Install dependencies
run: yarn install
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "arcana",
"name": "Arcana",
"version": "1.6.16",
"version": "1.6.17",
"minAppVersion": "0.15.0",
"description": "A collection of AI powered tools",
"author": "A-F-V",
Expand Down
7 changes: 3 additions & 4 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "arcana",
"version": "1.6.16",
"version": "1.6.17",
"description": "Arcana is a powerful AI assistant for Obsidian.",
"main": "main.js",
"scripts": {
Expand Down Expand Up @@ -39,6 +39,7 @@
},
"dependencies": {
"@langchain/anthropic": "^0.3.8",
"@langchain/core": "^0.3.19",
"@langchain/google-genai": "^0.1.4",
"@langchain/openai": "^0.3.14",
"@reduxjs/toolkit": "^1.9.5",
Expand Down
6 changes: 2 additions & 4 deletions src/include/ai/LLM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ChatAnthropic } from '@langchain/anthropic';
import { ChatGoogleGenerativeAI } from '@langchain/google-genai';
import { AgentSettings, AvailableModels } from '../ArcanaSettings';
import { TokenTextSplitter } from 'langchain/text_splitter';
import { BaseChatModel } from '@langchain/core/language_models/chat_models';

type Provider = 'openai' | 'anthropic' | 'gemini';

Expand Down Expand Up @@ -32,7 +33,7 @@ function getAPIKeyForProvider(settings: AgentSettings, provider: Provider): stri
return null;
}

export function getLLM(settings: AgentSettings, streaming = true) {
export function getLLM(settings: AgentSettings, streaming = true): BaseChatModel {
const model = settings.MODEL_TYPE;
const temperature = settings.TEMPERATURE;
const topP = settings.TOP_P;
Expand All @@ -51,7 +52,6 @@ export function getLLM(settings: AgentSettings, streaming = true) {
temperature: temperature,
topP: topP,
streaming: streaming,
maxRetries: 0,
});
case 'openai':
return new ChatOpenAI({
Expand All @@ -60,7 +60,6 @@ export function getLLM(settings: AgentSettings, streaming = true) {
temperature: temperature,
topP: topP,
streaming: streaming,
maxRetries: 0,
});
case 'gemini':
return new ChatGoogleGenerativeAI({
Expand All @@ -69,7 +68,6 @@ export function getLLM(settings: AgentSettings, streaming = true) {
temperature: temperature,
topP: topP,
streaming: streaming,
maxRetries: 0,
});
}
}
Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@
"1.6.13": "0.15.0",
"1.6.14": "0.15.0",
"1.6.15": "0.15.0",
"1.6.16": "0.15.0"
"1.6.16": "0.15.0",
"1.6.17": "0.15.0"
}

0 comments on commit 8753a1d

Please sign in to comment.