Can I run AutoGen on an Azure Functions App?

Tyler Suard 70 Reputation points
2023-11-28T23:49:15.3366667+00:00

I am trying to run AutoGen https://github.com/microsoft/autogen in an Azure Functions App and it is not working for me. I am getting this error:

Result: Failure Exception: OperationalError: unable to open database file

line 906, in generate_reply final, reply = reply_func(self, messages=messages, sender=sender, config=reply_func_tuple["config"]) File "/home/site/wwwroot/.python_packages/lib/site-packages/autogen/agentchat/conversable_agent.py", line 625, in generate_oai_reply response = client.create( File "/home/site/wwwroot/.python_packages/lib/site-packages/autogen/oai/client.py", line 232, in create with diskcache.Cache(f"{self.cache_path_root}/{cache_seed}") as cache: File "/home/site/wwwroot/.python_packages/lib/site-packages/diskcache/core.py", line 478, in init self.reset(key, value, update=False) File "/home/site/wwwroot/.python_packages/lib/site-packages/diskcache/core.py", line 2431, in reset ((old_value,),) = sql(

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,649 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MuthuKumaranMurugaachari-MSFT 22,271 Reputation points
    2023-11-29T16:23:59.77+00:00

    Tyler Suard Thanks for posting your question in Microsoft Q&A. Yes, it is possible to run AutoGen in Azure Functions app based on discussion here. Not sure how you have configured AutoGen in Function app (or AutoGen) but found you already opened an issue: Incompatible with Azure Functions App? in AutoGen repo.

    I think experts from the community are right person to help with this issue since it is more related to library rather than Azure Functions. But please let me know if I can assist in Azure Functions.

    Update for the community:

    Tyler Suard resolved the issue by setting cache_seed to None based on this discussion (related issue).

    I hope this helps others facing similar issues.


    If you found the answer to your question helpful, please take a moment to mark it as Yes for others to benefit from your experience. Or simply add a comment tagging me and would be happy to answer your questions.

    0 comments No comments