thanglekdi commited on
Commit
daedea1
·
1 Parent(s): 5748c22

test deepseek

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. call_api.py +3 -3
app.py CHANGED
@@ -3,7 +3,7 @@ import gradio as gr # type: ignore
3
  import call_api
4
 
5
  chat = gr.ChatInterface(
6
- call_api.call_deepseek, #chat
7
  title="Trợ lý Học Tập AI",
8
  description="Nhập câu hỏi của bạn về Toán, Lý, Hóa, Văn… và nhận giải đáp chi tiết ngay lập tức!",
9
  additional_inputs=[
 
3
  import call_api
4
 
5
  chat = gr.ChatInterface(
6
+ call_api.call_openai, #chat
7
  title="Trợ lý Học Tập AI",
8
  description="Nhập câu hỏi của bạn về Toán, Lý, Hóa, Văn… và nhận giải đáp chi tiết ngay lập tức!",
9
  additional_inputs=[
call_api.py CHANGED
@@ -98,9 +98,9 @@ def call_deepseek(
98
  response = deepseek.chat.completions.create(
99
  model="deepseek-chat", # hoặc model bạn cấu hình
100
  messages=messages,
101
- # temperature=temperature,
102
- # top_p=top_p,
103
- # max_tokens=max_tokens
104
  )
105
 
106
  # 5. Trích xuất kết quả trả về
 
98
  response = deepseek.chat.completions.create(
99
  model="deepseek-chat", # hoặc model bạn cấu hình
100
  messages=messages,
101
+ temperature=temperature,
102
+ top_p=top_p,
103
+ max_tokens=max_tokens
104
  )
105
 
106
  # 5. Trích xuất kết quả trả về