erenyasarkurt / OpenAI-AWS-Lambda-Layer

OpenAI AWS Lambda Layer. Includes a pre-built package zip as well as a way to build your own.
Apache License 2.0
97 stars 19 forks source link

Request for Compiled Version Support for Python 3.11 and 3.12 with Updated OpenAI Library #11

Open Davo-Exp4 opened 6 months ago

Davo-Exp4 commented 6 months ago

Hello,

I hope you are doing well. I am writing to request support for Python versions 3.11 and 3.12 in the context of AWS Lambda deployment, specifically regarding an updated version of the OpenAI library. Currently, the available version does not support the functionalities for calling the assistants that are in beta, which are crucial for the development of my project.

Additionally, I have encountered an issue when attempting to deploy my project on AWS Lambda using Lambda Layers. The error message is as follows:

{ "errorMessage": "Unable to import module 'lambda_function': No module named 'openai'", "errorType": "Runtime.ImportModuleError", "requestId": "a4afa524-28e3-445e-8e01-3a81fd82aa58", "stackTrace": [] }

This error suggests that the Lambda environment does not recognize the OpenAI module, potentially due to compatibility issues with the current versions of Python I am using (3.11 and 3.12).

Providing support for these versions of Python with an updated OpenAI library that includes the beta functionalities would be highly beneficial. It would not only resolve the current deployment issues but also enable us and others in the community to leverage the latest OpenAI API features in our serverless applications.

Could you please consider updating the library to support Python 3.11 and 3.12 and to include the necessary functionalities for working with the beta features of the OpenAI assistants? Additionally, any advice on addressing the import module error in AWS Lambda would be greatly appreciated.

Thank you for your time and consideration. I look forward to your response and any possible solutions you might offer.

Best regards.

syedfaiqueali commented 3 months ago

Hello,

I hope you are doing well. I am writing to request support for Python versions 3.11 and 3.12 in the context of AWS Lambda deployment, specifically regarding an updated version of the OpenAI library. Currently, the available version does not support the functionalities for calling the assistants that are in beta, which are crucial for the development of my project.

Additionally, I have encountered an issue when attempting to deploy my project on AWS Lambda using Lambda Layers. The error message is as follows:

{ "errorMessage": "Unable to import module 'lambda_function': No module named 'openai'", "errorType": "Runtime.ImportModuleError", "requestId": "a4afa524-28e3-445e-8e01-3a81fd82aa58", "stackTrace": [] }

This error suggests that the Lambda environment does not recognize the OpenAI module, potentially due to compatibility issues with the current versions of Python I am using (3.11 and 3.12).

Providing support for these versions of Python with an updated OpenAI library that includes the beta functionalities would be highly beneficial. It would not only resolve the current deployment issues but also enable us and others in the community to leverage the latest OpenAI API features in our serverless applications.

Could you please consider updating the library to support Python 3.11 and 3.12 and to include the necessary functionalities for working with the beta features of the OpenAI assistants? Additionally, any advice on addressing the import module error in AWS Lambda would be greatly appreciated.

Thank you for your time and consideration. I look forward to your response and any possible solutions you might offer.

Best regards.

Hi,

I've created AWS Lambda Layer for the latest version of openai. You can find its .zip over the below-attached repo link. Also, I've shared steps to create a custom lambda layer for any of your desired openai and python version.

Repo Link: https://github.com/syedfaiqueali/aws-lambda-layer-openai

Thanks!