-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Set up /gpt endpoint on backend that allows to use the OpenAI API - Created simple frontend for chat with user's and bot's answers
- Loading branch information
friezzerr
committed
May 19, 2024
1 parent
b530eca
commit 7e96fa9
Showing
20 changed files
with
4,925 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Gradle | ||
.gradle | ||
gradle/ | ||
build/ | ||
!gradle/wrapper/gradle-wrapper.jar | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
# VS Code | ||
.vscode/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
val ktor_version: String by project | ||
val kotlin_version: String by project | ||
val logback_version: String by project | ||
|
||
plugins { | ||
kotlin("jvm") version "1.8.20" | ||
id("io.ktor.plugin") version "2.2.4" | ||
id("org.jetbrains.kotlin.plugin.serialization") version "1.8.20" | ||
} | ||
|
||
group = "com.project_9" | ||
version = "0.0.1" | ||
application { | ||
mainClass.set("com.project_9.ApplicationKt") | ||
|
||
val isDevelopment: Boolean = project.ext.has("development") | ||
applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment") | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation("io.ktor:ktor-server-core-jvm:$ktor_version") | ||
implementation("io.ktor:ktor-server-content-negotiation:$ktor_version") | ||
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktor_version") | ||
implementation("io.ktor:ktor-serialization-jackson:$ktor_version") | ||
implementation("io.ktor:ktor-server-content-negotiation-jvm:$ktor_version") | ||
implementation("io.ktor:ktor-serialization-kotlinx-json-jvm:$ktor_version") | ||
implementation("io.ktor:ktor-server-netty-jvm:$ktor_version") | ||
implementation("ch.qos.logback:logback-classic:$logback_version") | ||
implementation("io.ktor:ktor-server-cors:$ktor_version") | ||
implementation("dev.kord:kord-core:0.8.2") | ||
implementation ("com.aallam.openai:openai-client:3.2.5") | ||
testImplementation("io.ktor:ktor-server-tests-jvm:$ktor_version") | ||
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version") | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>GPT Chat Bot</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.jsx"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.