Skip to content

Commit

Permalink
Update generation.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfsayo committed Feb 6, 2025
1 parent c69a105 commit 71cadbf
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/core/src/generation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ async function withRetry<T>(

export function initializeModelClient(runtime: IAgentRuntime, modelClass:ModelClass = ModelClass.DEFAULT) {

elizaLogger.info("Initializing model client with runtime:", JSON.stringify(runtime.getModelProvider()));
elizaLogger.info(`Initializing model client with runtime: ${runtime.modelProvider}`);
const provider = runtime.getModelProvider()?.provider || runtime.modelProvider;
const baseURL = runtime.getModelProvider()?.endpoint;
const apiKey = runtime.token ||
Expand Down Expand Up @@ -486,12 +486,7 @@ export async function generateMessageResponse({
return await withRetry(async () => {
const { client, model, systemPrompt } = initializeModelClient(runtime, modelClass);

elizaLogger.info("Generating message response with model:", model);

elizaLogger.info("System prompt:", systemPrompt);
elizaLogger.info("Client:", client);
elizaLogger.info("Model:", model);
elizaLogger.info("Context:", context);
elizaLogger.info(`Generating message response with model: ${model} & model class: ${modelClass}`);

const {text} = await aiGenerateText({
model: client.languageModel(model),
Expand Down

0 comments on commit 71cadbf

Please sign in to comment.