Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove createAction #394

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading