update zhipu api due to new model and api; repair extra invalid generate output; update its unittest

This commit is contained in:
better629 2024-01-17 16:28:13 +08:00
parent 75cbf9f087
commit 4e13eaca6e
17 changed files with 156 additions and 214 deletions

View file

@ -23,6 +23,10 @@ async def main():
# streaming mode, much slower
await llm.acompletion_text(hello_msg, stream=True)
# check completion if exist to test llm complete functions
if hasattr(llm, "completion"):
logger.info(llm.completion(hello_msg))
if __name__ == "__main__":
asyncio.run(main())