WildOjisan commited on
Commit
0d3782e
ยท
1 Parent(s): 7194311
Files changed (1) hide show
  1. routers/llm_router.py +5 -4
routers/llm_router.py CHANGED
@@ -78,14 +78,14 @@ def test_home(userquery: str = Form("")
78
  """
79
  }
80
  ]
81
-
82
  # 5. ์ด์ „ ๋Œ€ํ™” ๊ธฐ๋ก ์ถ”๊ฐ€
83
  for msg in history:
84
  messages.append({
85
  "role": msg["role"],
86
  "content": msg["content"]
87
  })
88
-
89
  # 6. ์ด๋ฒˆ ์‚ฌ์šฉ์ž ์งˆ๋ฌธ ์ถ”๊ฐ€
90
  messages.append({
91
  "role": "user",
@@ -99,12 +99,13 @@ def test_home(userquery: str = Form("")
99
  ์œ„ ์งˆ๋ฌธ๊ณผ ์„ ํƒ๋œ ์นด๋“œ๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ์งง๊ฒŒ ํƒ€๋กœ ์ƒ๋‹ด์„ ํ•ด์ฃผ์„ธ์š”.
100
  """
101
  })
102
-
 
103
  payload = {
104
  "model": "openai-fast",
105
  "messages": messages,
106
  "temperature": 0.8,
107
- "max_tokens": 1000,
108
  "stream": False
109
  }
110
 
 
78
  """
79
  }
80
  ]
81
+
82
  # 5. ์ด์ „ ๋Œ€ํ™” ๊ธฐ๋ก ์ถ”๊ฐ€
83
  for msg in history:
84
  messages.append({
85
  "role": msg["role"],
86
  "content": msg["content"]
87
  })
88
+
89
  # 6. ์ด๋ฒˆ ์‚ฌ์šฉ์ž ์งˆ๋ฌธ ์ถ”๊ฐ€
90
  messages.append({
91
  "role": "user",
 
99
  ์œ„ ์งˆ๋ฌธ๊ณผ ์„ ํƒ๋œ ์นด๋“œ๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ์งง๊ฒŒ ํƒ€๋กœ ์ƒ๋‹ด์„ ํ•ด์ฃผ์„ธ์š”.
100
  """
101
  })
102
+ print(f"# userquery: \n",userquery)
103
+ print(f"# messages: \n",messages)
104
  payload = {
105
  "model": "openai-fast",
106
  "messages": messages,
107
  "temperature": 0.8,
108
+ "max_tokens": 5000,
109
  "stream": False
110
  }
111