mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-23 10:33:46 +00:00
fix: fix bard LLM request param error
fix bard LLM request param error, use 'content' as the input
This commit is contained in:
parent
d95726c04a
commit
b1d84fb317
@ -31,10 +31,9 @@ def bard_generate_stream(model, tokenizer, params, device, context_len=2048):
|
|||||||
history.remove(last_user_input)
|
history.remove(last_user_input)
|
||||||
history.append(last_user_input)
|
history.append(last_user_input)
|
||||||
|
|
||||||
response = bardapi.core.Bard(token).get_answer(last_user_input)
|
response = bardapi.core.Bard(token).get_answer(last_user_input["content"])
|
||||||
if response is not None and response.get("content") is not None:
|
if response is not None and response.get("content") is not None:
|
||||||
yield str(response["content"])
|
yield str(response["content"])
|
||||||
yield f"bard response error: {str(response)}"
|
yield f"bard response error: {str(response)}"
|
||||||
|
|
||||||
|
|
||||||
print(bard_generate_stream("bard_proxy_llm", None, {"input": "hi"}, None, 2048))
|
|
||||||
|
Loading…
Reference in New Issue
Block a user