Skip to content

Commit

Permalink
Remove unused exports
Browse files Browse the repository at this point in the history
  • Loading branch information
rileytomasek committed Oct 13, 2024
1 parent 8681798 commit 3eb2fa8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
18 changes: 1 addition & 17 deletions src/model/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { deepmerge as deepmergeInit } from '@fastify/deepmerge';
export type Prettify<T> = { [K in keyof T]: T[K] } & {};

type DeepMerge = ReturnType<typeof deepmergeInit>;
export const deepMergeImpl: DeepMerge = deepmergeInit();
const deepMergeImpl: DeepMerge = deepmergeInit();

const deepMergeEventsImpl: DeepMerge = deepmergeInit({
// Note: this is not using a recursive deep merge since it isn't used for events.
Expand Down Expand Up @@ -61,19 +61,3 @@ export const omit = <T extends Record<any, unknown>, K extends keyof T>(
Object.fromEntries(
Object.entries(obj).filter(([k]) => !keys.includes(k as any))
) as any;

/**
* From `obj`, create a new object that only includes `keys`.
*
* @example
* ```
* pick({ a: 1, b: 2, c: 3 }, 'a', 'c') // { a: 1, c: 3 }
* ```
*/
export const pick = <T extends Record<any, unknown>, K extends keyof T>(
obj: T,
...keys: K[]
): Pick<T, K> =>
Object.fromEntries(
Object.entries(obj).filter(([k]) => keys.includes(k as any))
) as any;
2 changes: 1 addition & 1 deletion src/model/utils/message-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export function cleanString(text: string): string {
*
* This is intended to be used with `function` and `tool` arguments and responses.
*/
export function stringifyForModel(jsonObject: Jsonifiable | void): string {
function stringifyForModel(jsonObject: Jsonifiable | void): string {
if (jsonObject === undefined) {
return '';
}
Expand Down

0 comments on commit 3eb2fa8

Please sign in to comment.