mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-11-17 09:25:50 +00:00
Update Aura.py
This commit is contained in:
parent
ae8dd4048c
commit
ff13f4f500
@ -17,6 +17,8 @@ class Aura(AsyncGeneratorProvider):
|
|||||||
model: str,
|
model: str,
|
||||||
messages: Messages,
|
messages: Messages,
|
||||||
proxy: str = None,
|
proxy: str = None,
|
||||||
|
temperature: float = 0.5,
|
||||||
|
max_tokens: int = 8192.
|
||||||
webdriver: WebDriver = None,
|
webdriver: WebDriver = None,
|
||||||
**kwargs
|
**kwargs
|
||||||
) -> AsyncResult:
|
) -> AsyncResult:
|
||||||
@ -34,14 +36,14 @@ class Aura(AsyncGeneratorProvider):
|
|||||||
"id": "openchat_v3.2_mistral",
|
"id": "openchat_v3.2_mistral",
|
||||||
"name": "OpenChat Aura",
|
"name": "OpenChat Aura",
|
||||||
"maxLength": 24576,
|
"maxLength": 24576,
|
||||||
"tokenLimit": 8192
|
"tokenLimit": max_tokens
|
||||||
},
|
},
|
||||||
"messages": new_messages,
|
"messages": new_messages,
|
||||||
"key": "",
|
"key": "",
|
||||||
"prompt": "\n".join(system_message),
|
"prompt": "\n".join(system_message),
|
||||||
"temperature": 0.5
|
"temperature": temperature
|
||||||
}
|
}
|
||||||
async with session.post(f"{cls.url}/api/chat", json=data, proxy=proxy) as response:
|
async with session.post(f"{cls.url}/api/chat", json=data, proxy=proxy) as response:
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
async for chunk in response.content.iter_any():
|
async for chunk in response.content.iter_any():
|
||||||
yield chunk.decode()
|
yield chunk.decode(error="ignore")
|
Loading…
Reference in New Issue
Block a user