Skip to content

sasgilmer/open-ai-climate-hack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

open-ai-climate-hack

Set up

  1. Clone this repository and cd into the project folder
git clone https://github.com/rchang0501/open-ai-climate-hack.git
cd open-ai-climate-hack
  1. cd into the frontend folder and install node modules
cd frontend
npm i
  1. Start the React app in the frontend folder
npm start

Demos

Text Davinci

config:

const prompt = `${codeInput}\n\ntranslate the above ${inputType} code to ${outputLanguage} code.`;
    const res = await openai.createCompletion({
      model: "text-davinci-002",
      prompt: prompt,
      temperature: 0,
      max_tokens: 500,
    });
  1. Simple if-else statement Python code with Text Davinci
simpleIfElseGood.mov
  1. HVAC controller Python code with Text Davinci
set-hvac-mode-good.mov

*note: translation worked fine but the IF, ELSE statement captilization convention is not preserved. Syntactically is valid though since ST isn't case sensitive.

Code Davinci

config:

const prompt = `${codeInput}\n\ntranslate the above ${inputType} code to ${outputLanguage} code`;
    const res = await openai.createCompletion({
      model: "code-davinci-002",
      prompt: prompt,
      temperature: 0,
      max_tokens: 115,
    });
  1. Simple LeetCode Problem using Code Davinci
lc-good.mov

Designs

Figma prototype

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 48.4%
  • Smalltalk 22.7%
  • Python 21.3%
  • HTML 7.1%
  • JavaScript 0.5%