Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backend : feat] mysql 서버 ip 적용 #35

Merged
merged 4 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public ResponseEntity<ChatGptMessage> sendQuestion(@RequestBody QuestionRequestD
} catch (Exception e) {
code = e.getMessage();
}
//return 부분은 자유롭게 수정하시면됩니다. ex)return chatGptResponse;
return ResponseEntity.ok(chatGptResponseDTO.getChoices().get(0).getMessage());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,21 @@

import com.fasterxml.jackson.annotation.JsonProperty;
import com.isp.backend.domain.gpt.entity.ChatGptMessage;
import lombok.Builder;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.util.List;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public class ChatGptRequestDTO {
private String model;

@JsonProperty("max_tokens")
private Integer maxTokens;
private Double temperature;
private Boolean stream;
private List<ChatGptMessage> messages;

@Builder
public ChatGptRequestDTO(String model, Integer maxTokens, Double temperature,
Boolean stream, List<ChatGptMessage> messages
/*,Double topP*/) {
this.model = model;
this.maxTokens = maxTokens;
this.temperature = temperature;
this.stream = stream;
this.messages = messages;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.fasterxml.jackson.annotation.JsonProperty;
import com.isp.backend.domain.gpt.entity.ChatGptMessage;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
Expand All @@ -10,6 +11,7 @@

@Getter
@NoArgsConstructor
@AllArgsConstructor
public class ChatGptResponseDTO {
private String id;
private String object;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package com.isp.backend.domain.gpt.dto;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public class QuestionRequestDTO implements Serializable {
private String question;
}
2 changes: 1 addition & 1 deletion backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spring:
ddl-auto: update
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/trip
url: jdbc:mysql://3.38.54.32:3306/trip
username: ${DB_USERNAME}
password: ${DB_PASSWORD}

Expand Down
Loading