Skip to content

Commit

Permalink
fix: use metadata for consistency (#127)
Browse files Browse the repository at this point in the history
* chore: update package.json links with public repo

* fix: use `metadata` for consistency
Fixes #119
  • Loading branch information
connor4312 authored Oct 31, 2024
1 parent 8a504bb commit 089ff32
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/base/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ export async function renderPrompt<P extends BasePromptElementProps>(
): Promise<{
messages: LanguageModelChatMessage[];
tokenCount: number;
/** @deprecated use {@link metadata} */
metadatas: MetadataMap;
metadata: MetadataMap;
usedContext: ChatDocumentContext[];
references: PromptReference[];
}>;
Expand Down Expand Up @@ -99,7 +101,9 @@ export async function renderPrompt<P extends BasePromptElementProps>(
): Promise<{
messages: ChatMessage[];
tokenCount: number;
/** @deprecated use {@link metadata} */
metadatas: MetadataMap;
metadata: MetadataMap;
usedContext: ChatDocumentContext[];
references: PromptReference[];
}>;
Expand All @@ -114,7 +118,9 @@ export async function renderPrompt<P extends BasePromptElementProps>(
): Promise<{
messages: (ChatMessage | LanguageModelChatMessage)[];
tokenCount: number;
/** @deprecated use {@link metadata} */
metadatas: MetadataMap;
metadata: MetadataMap;
usedContext: ChatDocumentContext[];
references: PromptReference[];
}> {
Expand All @@ -130,7 +136,7 @@ export async function renderPrompt<P extends BasePromptElementProps>(
messages = toVsCodeChatMessages(messages);
}

return { messages, tokenCount, metadatas: metadata, usedContext, references };
return { messages, tokenCount, metadatas: metadata, metadata, usedContext, references };
}

/**
Expand Down

0 comments on commit 089ff32

Please sign in to comment.