poe-platform / fastapi_poe

A helper library for writing Poe API bots using FastAPI
Apache License 2.0
112 stars 21 forks source link

function calling support coroutine function #90

Closed canwushuang closed 2 months ago

canwushuang commented 2 months ago

function calling support coroutine function

canwushuang commented 2 months ago

A better way is to add import inspect and use inspect.iscoroutinefunction() as an alternative. https://github.com/python/cpython/issues/94912

JelleZijlstra commented 2 months ago

Thank you! Yes, let's use the inspect version (https://docs.python.org/3.10/library/inspect.html#inspect.iscoroutinefunction); could you change the PR?