Skip to content

Commit

Permalink
Merge pull request #23 from sweet-muffin/main
Browse files Browse the repository at this point in the history
[Fix] 요약 기능 수정 및 에러 수정
  • Loading branch information
JLake310 committed Aug 3, 2023
2 parents 984952c + 63a05c3 commit 59f3f3b
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 12 deletions.
6 changes: 5 additions & 1 deletion backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,13 @@ def get_summary_completion(prompt, model="gpt-3.5-turbo"):
messages = [
{
"role": "system",
"content": "다음을 불렛 형식으로 한 줄당 18자 이내로 깔끔하게 정리해줘.",
"content": "다음을 불렛 형식으로,불렛당 글자 25자 이내로, 불렛은 7개 이내로 짧고 깔끔하게 정리해줘.",
},
{"role": "user", "content": prompt},
{
"role": "assistant",
"content": "- 설명1\n- 설명2\n- 설명3\n- 설명4\n- 설명5\n- 설명6\n- 설명7",
},
]
response = openai.ChatCompletion.create(
model=model,
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/blocks/IntroModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as CT from "@assets/customTypes";

const IntroModal = (props: {
ModalOffHander: () => void;
ModalBackHander: () => void;
introInfo: CT.IntroType;
NextPageHandler: () => void;
}) => {
Expand All @@ -18,7 +19,7 @@ const IntroModal = (props: {
return (
<ModalBackground onClick={props.ModalOffHander}>
<ModalDiv>
<CloseButton onClick={props.ModalOffHander}>X</CloseButton>
<CloseButton onClick={props.ModalBackHander}>X</CloseButton>
<ModalIMG src={props.introInfo.detailURL} alt="" />
<ModalTextWrapper>
<PositionName>{props.introInfo.positionName}</PositionName>
Expand Down
10 changes: 8 additions & 2 deletions frontend/src/components/blocks/JobModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ const JobModal = (props: {
</JobItem>
))}
</JobItemWrapper>
<JobNextButton src={button_back} onClick={props.JobNextHandler}>
<JobNextButton
jobid={props.curJobID}
src={button_back}
onClick={props.JobNextHandler}
>
포지션 보러가기
</JobNextButton>
</JobModalWrapper>
Expand Down Expand Up @@ -128,6 +132,7 @@ const JobItem = styled.div<ItemType>`

interface CardType {
src: string;
jobid: number;
}

const JobNextButton = styled.button<CardType>`
Expand All @@ -142,5 +147,6 @@ const JobNextButton = styled.button<CardType>`
height: ${isMobile() ? "50rem" : "70rem"};
background-image: url(${(props) => props.src});
margin-top: 32rem;
cursor: pointer;
opacity: ${(props) => (props.jobid === -1 ? "0.3" : "1; cursor: pointer")};
`;
9 changes: 6 additions & 3 deletions frontend/src/components/pages/JobPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ const JobPage = () => {
};

const JobNextHandler = () => {
setPositionModal(false);
FetchPositionData();
if (curJobID !== -1) {
setPositionModal(false);
FetchPositionData();
}
};

const PositionSelectHandler = (
Expand Down Expand Up @@ -160,7 +162,7 @@ const JobPage = () => {
source: "job",
},
}).then((response) => {
history.push(`/result?id=${response.data.want_id}`);
// history.push(`/result?id=${response.data.want_id}`);
navigate(`/result?id=${response.data.want_id}`);
});
};
Expand Down Expand Up @@ -189,6 +191,7 @@ const JobPage = () => {
{introInfo && (
<IntroModal
ModalOffHander={ModalOffHander}
ModalBackHander={ModalBackHander}
introInfo={introInfo!}
NextPageHandler={NextPageHandler}
/>
Expand Down
17 changes: 12 additions & 5 deletions frontend/src/components/pages/ResultPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,15 @@ const ResultPage = () => {
흥미진진한 학습을 시작해보세요!
</TitleText>
<ContentTitle>
{source === "project"
? "프로젝트를 수행하기 위해서는 다음과 같은 스택과 지식이 필요합니다."
: "해당 포지션에서 요구하는 능력은 다음과 같습니다."}
{source === "project" ? (
<>
프로젝트를 수행하기 위해서는
<br />
다음과 같은 스택과 지식이 필요합니다.
</>
) : (
"해당 포지션에서 요구하는 능력은 다음과 같습니다."
)}
</ContentTitle>
<Fade bottom>
<ContentBox>
Expand Down Expand Up @@ -232,12 +238,13 @@ const ContentText = styled.span`
text-align: start;
background-color: transparent;
white-space: pre-line;
width: 90%;
width: 95%;
word-break: keep-all;
`;

const ContentBox = styled.div`
width: ${isMobile() ? "310rem" : "870rem;"};
padding: ${isMobile() ? "20rem" : "40rem 20rem"};
padding: ${isMobile() ? "20rem 10rem" : "40rem 20rem"};
max-height: ${isMobile() ? "120rem" : "314rem"};
border: solid 2rem ${(props) => props.theme.colors.udemy};
border-radius: 20rem;
Expand Down

0 comments on commit 59f3f3b

Please sign in to comment.