Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
YousefED committed Oct 11, 2023
1 parent f914978 commit b320e1d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions packages/editor/src/integrations/ai/openai.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { OpenAIStream, StreamingTextResponse } from "ai";
import { ChatCompletionCreateParamsBase, OpenAI } from "openai";
import { OpenAI } from "openai";

export async function queryOpenAI(parameters: {
messages: ChatCompletionCreateParamsBase["messages"];
functions?: ChatCompletionCreateParamsBase["functions"];
function_key?: ChatCompletionCreateParamsBase["function_key"];
messages: OpenAI.Chat.ChatCompletionCreateParams["messages"];
functions?: OpenAI.Chat.ChatCompletionCreateParams["functions"];
function_call?: OpenAI.Chat.ChatCompletionCreateParams["function_call"];
}) {
// get key from localstorage
let key = localStorage.getItem("oai-key");
Expand Down
4 changes: 2 additions & 2 deletions packages/frame/src/ai/ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import "@blocknote/core/style.css";
import * as mobx from "mobx";
import * as monaco from "monaco-editor";
import { ChatCompletionMessageParam } from "openai";
import type openai from "openai";

import { BlockNoteEditor } from "@blocknote/core";
import { HostBridgeMethods } from "@typecell-org/shared";
Expand Down Expand Up @@ -260,7 +260,7 @@ type ExpandRecursively<T> = T extends object
}`
: undefined;

const messages: Array<ChatCompletionMessageParam> = [
const messages: openai.Chat.ChatCompletionCreateParams["messages"] = [
{
role: "system",
content: TYPECELL_PROMPT,
Expand Down

0 comments on commit b320e1d

Please sign in to comment.