seawolf2357
commited on
Commit
β’
2276533
1
Parent(s):
4ba4468
Update app.py
Browse files
app.py
CHANGED
@@ -46,14 +46,9 @@ async def generate_response(user_input):
|
|
46 |
loop = asyncio.get_event_loop()
|
47 |
response = await loop.run_in_executor(None, lambda: hf_client.chat_completion(messages, max_tokens=4000, stream=False, temperature=0.7, top_p=0.95))
|
48 |
|
49 |
-
#
|
50 |
-
|
51 |
|
52 |
-
# λ°ν κ°μ²΄μ μ¬λ°λ₯Έ μμ± μ κ·Ό λ°©λ²μ νμΈ
|
53 |
-
return response.choices[0].text.strip() # μμ±λͺ
μ΄ λ³κ²½λμμ μ μμΌλ νμΈ νμ
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
# λμ€μ½λ λ΄ μΈμ€ν΄μ€ μμ± λ° μ€ν
|
58 |
discord_client = MyClient(intents=intents)
|
59 |
discord_client.run(os.getenv('DISCORD_TOKEN'))
|
|
|
46 |
loop = asyncio.get_event_loop()
|
47 |
response = await loop.run_in_executor(None, lambda: hf_client.chat_completion(messages, max_tokens=4000, stream=False, temperature=0.7, top_p=0.95))
|
48 |
|
49 |
+
# API μλ΅ λ‘κ·Έμ λ°λΌ content μμ± μ¬μ©
|
50 |
+
return response.choices[0].message.content.strip()
|
51 |
|
|
|
|
|
|
|
|
|
|
|
52 |
# λμ€μ½λ λ΄ μΈμ€ν΄μ€ μμ± λ° μ€ν
|
53 |
discord_client = MyClient(intents=intents)
|
54 |
discord_client.run(os.getenv('DISCORD_TOKEN'))
|