Skip to content

Commit

Permalink
Merge pull request #394 from thedadams/remove-create-action
Browse files Browse the repository at this point in the history
chore: remove createAction
  • Loading branch information
thedadams authored Aug 30, 2024
2 parents b700bce + 7b51e6b commit 1561530
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
5 changes: 2 additions & 3 deletions actions/gptscript.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import { ToolDef, Tool, Block, Text, Program } from '@gptscript-ai/gptscript';
import { gpt } from '@/config/env';
import { createAction } from '@/actions/helpers';

export const rootTool = async (toolContent: Block[]): Promise<Tool> => {
for (const block of toolContent) {
Expand All @@ -18,9 +17,9 @@ export const parseContent = async (toolContent: string): Promise<Tool[]> => {
) as Tool[];
};

export const parseBlock = createAction(async (ref: string) => {
export const parseBlock = async (ref: string) => {
return await gpt().parse(ref);
});
};

export const parse = async (file: string): Promise<Tool[]> => {
const parsedTool = await gpt().parse(file);
Expand Down
14 changes: 0 additions & 14 deletions actions/helpers.ts

This file was deleted.

0 comments on commit 1561530

Please sign in to comment.