PhilSad commited on
Commit
dace00d
·
1 Parent(s): 85503aa
Files changed (2) hide show
  1. app.py +1 -0
  2. test.py +15 -3
app.py CHANGED
@@ -33,6 +33,7 @@ async def proxy_mistral(request_data: Dict):
33
  # Send the request to the Mistral API
34
  async with httpx.AsyncClient() as client:
35
  response = await client.post(url, headers=headers, json=request_data)
 
36
 
37
  # Check the response status
38
  if response.status_code != 200:
 
33
  # Send the request to the Mistral API
34
  async with httpx.AsyncClient() as client:
35
  response = await client.post(url, headers=headers, json=request_data)
36
+ print(response)
37
 
38
  # Check the response status
39
  if response.status_code != 200:
test.py CHANGED
@@ -2,9 +2,21 @@ import requests
2
  url = "https://philsad-dad-knows-best-api.hf.space/proxy/mistral"
3
 
4
  data = {
5
- "system_prompt" : 'you are a rapper',
6
- "input_text": "who a re you ?"
7
- }
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
  response = requests.post(url, json=data)
10
 
 
2
  url = "https://philsad-dad-knows-best-api.hf.space/proxy/mistral"
3
 
4
  data = {
5
+ "model": "mistral-large",
6
+ "temperature": 0.1,
7
+ "top_p": 1,
8
+ "max_tokens": 1000,
9
+ "messages": [
10
+ {
11
+ "role": "system",
12
+ "content": "hello"
13
+ },
14
+ {
15
+ "role": "user",
16
+ "content": "say hello"
17
+ }
18
+ ]
19
+ }
20
 
21
  response = requests.post(url, json=data)
22