Skip to content

Commit a06c96c

Browse files
authored
Merge branch 'develop' into feature/add-coinmarketcap-plugin
2 parents 75a5385 + 7e89342 commit a06c96c

File tree

4 files changed

+64
-19
lines changed

4 files changed

+64
-19
lines changed

.env.example

+4
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,10 @@ WALLET_SECRET_SALT= # ONLY define if you want to use TEE Plugin, oth
297297

298298
# Galadriel Configuration
299299
GALADRIEL_API_KEY=gal-* # Get from https://dashboard.galadriel.com/
300+
SMALL_GALADRIEL_MODEL= # Default: gpt-4o-mini
301+
MEDIUM_GALADRIEL_MODEL= # Default: gpt-4o
302+
LARGE_GALADRIEL_MODEL= # Default: gpt-4o
303+
GALADRIEL_FINE_TUNE_API_KEY= # Use an OpenAI key to use a fine-tuned model with the verified inference endpoint
300304

301305
# Venice Configuration
302306
VENICE_API_KEY= # generate from venice settings
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Pnpm Lockfile Check
2+
3+
on:
4+
pull_request:
5+
branches: ["*"]
6+
7+
jobs:
8+
check-lockfile:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: 23.3.0
16+
17+
- uses: pnpm/action-setup@v3
18+
with:
19+
version: 9.15.0
20+
21+
- name: Check if lockfile is up-to-date
22+
id: lockfile-check
23+
run: |
24+
# Try to install with frozen lockfile
25+
if ! pnpm install --frozen-lockfile; then
26+
echo "::error::Lockfile is out of date. Please run 'pnpm install --no-frozen-lockfile' and commit the updated pnpm-lock.yaml"
27+
echo "failed=true" >> $GITHUB_OUTPUT
28+
exit 1
29+
fi
30+
31+
- name: Comment on PR
32+
if: failure() && steps.lockfile-check.outputs.failed == 'true'
33+
uses: actions/github-script@v7
34+
with:
35+
script: |
36+
github.rest.issues.createComment({
37+
issue_number: context.issue.number,
38+
owner: context.repo.owner,
39+
repo: context.repo.repo,
40+
body: '❌ The pnpm-lockfile is out of date. Please run `pnpm install --no-frozen-lockfile` and commit the updated pnpm-lock.yaml file.'
41+
})

packages/core/src/generation.ts

+6
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,13 @@ export async function generateText({
789789

790790
case ModelProviderName.GALADRIEL: {
791791
elizaLogger.debug("Initializing Galadriel model.");
792+
const headers = {}
793+
const fineTuneApiKey = runtime.getSetting("GALADRIEL_FINE_TUNE_API_KEY")
794+
if (fineTuneApiKey) {
795+
headers["Fine-Tune-Authentication"] = fineTuneApiKey
796+
}
792797
const galadriel = createOpenAI({
798+
headers,
793799
apiKey: apiKey,
794800
baseURL: endpoint,
795801
fetch: runtime.fetch,

packages/core/src/models.ts

+13-19
Original file line numberDiff line numberDiff line change
@@ -558,40 +558,34 @@ export const models: Models = {
558558
},
559559
},
560560
[ModelProviderName.GALADRIEL]: {
561-
endpoint: "https://api.galadriel.com/v1",
561+
endpoint: "https://api.galadriel.com/v1/verified",
562562
model: {
563563
[ModelClass.SMALL]: {
564-
name: "llama3.1:70b",
564+
name: settings.SMALL_GALADRIEL_MODEL || "gpt-4o-mini",
565565
stop: [],
566566
maxInputTokens: 128000,
567567
maxOutputTokens: 8192,
568-
frequency_penalty: 0.5,
569-
presence_penalty: 0.5,
570-
temperature: 0.8,
568+
frequency_penalty: 0.0,
569+
presence_penalty: 0.0,
570+
temperature: 0.6,
571571
},
572572
[ModelClass.MEDIUM]: {
573-
name: "llama3.1:70b",
573+
name: settings.MEDIUM_GALADRIEL_MODEL || "gpt-4o",
574574
stop: [],
575575
maxInputTokens: 128000,
576576
maxOutputTokens: 8192,
577-
frequency_penalty: 0.5,
578-
presence_penalty: 0.5,
579-
temperature: 0.8,
577+
frequency_penalty: 0.0,
578+
presence_penalty: 0.0,
579+
temperature: 0.6,
580580
},
581581
[ModelClass.LARGE]: {
582-
name: "llama3.1:405b",
582+
name: settings.LARGE_GALADRIEL_MODEL || "gpt-4o",
583583
stop: [],
584584
maxInputTokens: 128000,
585585
maxOutputTokens: 8192,
586-
frequency_penalty: 0.5,
587-
presence_penalty: 0.5,
588-
temperature: 0.8,
589-
},
590-
[ModelClass.EMBEDDING]: {
591-
name: "gte-large-en-v1.5",
592-
},
593-
[ModelClass.IMAGE]: {
594-
name: "stabilityai/stable-diffusion-xl-base-1.0",
586+
frequency_penalty: 0.0,
587+
presence_penalty: 0.0,
588+
temperature: 0.6,
595589
},
596590
},
597591
},

0 commit comments

Comments
 (0)