Skip to content

Commit

Permalink
refactor: Convert openaiTest.ts to CommonJS syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
cbh123 committed Sep 13, 2024
1 parent 489be0e commit 0666706
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions extensions/spectacular/src/backend/openaiTest.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { OpenAIConversation, OpenAIMessage } from "../types";
import { streamOpenAI, Models } from "./openaiAPI";
const { OpenAIConversation, OpenAIMessage } = require("../types");
const { streamOpenAI, Models } = require("./openaiAPI");

export async function testOpenAI(): Promise<string> {
async function testOpenAI() {
const conversation: OpenAIConversation = {
system: "You are a helpful assistant.",
messages: [
Expand All @@ -28,3 +28,5 @@ export async function testOpenAI(): Promise<string> {
}
}

module.exports = { testOpenAI };

0 comments on commit 0666706

Please sign in to comment.