mirror of
https://github.com/harry0703/MoneyPrinterTurbo.git
synced 2026-02-21 08:27:22 +08:00
🎨 style: format llm.py code
This commit is contained in:
parent
2d8cd23fe7
commit
c4586d37f5
@ -179,7 +179,10 @@ def _generate_response(prompt: str) -> str:
|
||||
headers={"Authorization": f"Bearer {api_key}"},
|
||||
json={
|
||||
"messages": [
|
||||
{"role": "system", "content": "You are a friendly assistant"},
|
||||
{
|
||||
"role": "system",
|
||||
"content": "You are a friendly assistant",
|
||||
},
|
||||
{"role": "user", "content": prompt},
|
||||
]
|
||||
},
|
||||
@ -197,7 +200,9 @@ def _generate_response(prompt: str) -> str:
|
||||
"client_secret": secret_key,
|
||||
}
|
||||
access_token = (
|
||||
requests.post("https://aip.baidubce.com/oauth/2.0/token", params=params)
|
||||
requests.post(
|
||||
"https://aip.baidubce.com/oauth/2.0/token", params=params
|
||||
)
|
||||
.json()
|
||||
.get("access_token")
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user