-
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.
Feat/gpt 나쁜말 고르는 로직 썼다. gpt 써ㅅ서 (#27)
* Feat: Add gpt key in env * Feat: Add method checking if the word user provide is bad word or not through gpt * Chore: Remove useless * Feat: Add try catch in gpt service * Feat: Add return type
- Loading branch information
Showing
9 changed files
with
215 additions
and
0 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 |
---|---|---|
|
@@ -10,6 +10,7 @@ KAKAO_CLIENT_ID= | |
KAKAO_REDIRECT_URL= | ||
KAKAO_REST_API_KEY= | ||
CLIENT_URL= | ||
GPT_KEY= | ||
|
||
PORT=8000 | ||
|
||
|
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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,19 @@ | ||
import { Controller, Get, Injectable, Param } from '@nestjs/common'; | ||
import { ApiTags } from '@nestjs/swagger'; | ||
|
||
import { UseAuthGuard } from 'src/common/decorators/auth-guard.decorator'; | ||
|
||
import { GptService } from './gpt.service'; | ||
|
||
@Injectable() | ||
@ApiTags('gpt') | ||
@Controller('gpt') | ||
export class GptController { | ||
constructor(private readonly gptService: GptService) {} | ||
|
||
@Get(':word') | ||
@UseAuthGuard(['ADMIN']) | ||
checkIfIsBadWordx(@Param('word') word: string) { | ||
return this.gptService.checkIfIsBadwordWithGpt(word); | ||
} | ||
} |
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,12 @@ | ||
import { Module } from '@nestjs/common'; | ||
|
||
import { GptController } from './gpt.controller'; | ||
import { GptService } from './gpt.service'; | ||
|
||
@Module({ | ||
imports: [], | ||
controllers: [GptController], | ||
providers: [GptService], | ||
exports: [GptService], | ||
}) | ||
export class GptModule {} |
Oops, something went wrong.