This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fetch from 'node-fetch' | |
import keys from "./api-keys.json" | |
const OPENAI_API_KEY = keys["openai_key"] | |
const OPENAI_CHATGPTAPI_URL = "https://api.openai.com/v1/chat/completions" | |
async function getChatGPTResponse(systemPrompt: string, userPrompt: string) { | |
let requestBody = { | |
model: 'gpt-3.5-turbo', | |
messages: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface IPanelProps { | |
txt?: string | |
} | |
export class PanelDemo1 extends Component<IPanelDemoProps, {}> { | |
render() { | |
const { panelName } = this.props | |
const selectedPanel = panelName === "panel1" ? <Panel1 /> : <Panel2 /> | |
return selectedPanel | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Just a test | |
Log.Write("Just a test ;)"); |