Skip to content

Commit

Permalink
Merge pull request #407 from ai16z/fixes
Browse files Browse the repository at this point in the history
fix: Fixes
  • Loading branch information
ponderingdemocritus authored Nov 18, 2024
2 parents b4e0131 + afb04b5 commit c96e838
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import fs from "fs";
import readline from "readline";
import yargs from "yargs";
import { character } from "./character.ts";

export const wait = (minTime: number = 1000, maxTime: number = 3000) => {
const waitTime =
Math.floor(Math.random() * (maxTime - minTime + 1)) + minTime;
Expand Down
4 changes: 2 additions & 2 deletions packages/client-discord/src/actions/summarize_conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ const summarizeAction = {

let currentSummary = "";

const model = models[runtime.character.modelProvider];
const chunkSize = model.settings.maxOutputTokens - 1000;
const model = models[runtime.character.settings.model];
const chunkSize = model.settings.maxContextLength - 1000;

const chunks = await splitChunks(formattedMemories, chunkSize, 0);

Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-node/src/services/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class ImageDescriptionService extends Service {
return;
}

const model = models[runtime.character.modelProvider];
const model = models[runtime?.character?.modelProvider];

if (model === models[ModelProviderName.LLAMALOCAL]) {
this.modelId = "onnx-community/Florence-2-base-ft";
Expand Down
4 changes: 2 additions & 2 deletions pnpm-lock.yaml

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

0 comments on commit c96e838

Please sign in to comment.