langflow icon indicating copy to clipboard operation
langflow copied to clipboard

Features change when langflow is run from the Env Variables

Open edwinjosechittilappilly opened this issue 1 year ago • 4 comments

Bug Description

Open AI models available in default mode is not available when langflow was loaded with .env file with admin login

example. earlier gtp4o mini was available but when i loaded langflow with env variable file it is missing

Reproduction

  1. run langlfow in basic mode: load open ai component: you can see gpt4o mini available.
  2. langflow run --env-file /Users/edwin.jose/Documents/GitHub/amelia/langflowcreds/.env
  3. login with username and cred 4.load OpenAI component : gpt4o mini is missing.

Expected behavior

Both run should have same models. When I check source code too its the same model names being loaded. Suggestion: I would manually edit to get gpt4o mini.

Who can help?

No response

Operating System

Mac OS

Langflow Version

1.0.12

Python Version

3.11

Screenshot

Screenshot 2024-07-25 at 8 05 30 PM Screenshot 2024-07-25 at 8 05 10 PM

Flow File

No response

edwinjosechittilappilly avatar Jul 26 '24 00:07 edwinjosechittilappilly

The issue you're experiencing with the "gpt4o mini" model missing when running Langflow with an environment variables file and admin login is due to the model not being listed in the options array for the model_name field in the OpenAIModelComponent class in the OpenAIModel.py file. The available models are:

"options": [
    "gpt-4-turbo-2024-04-09",
    "gpt-4-turbo-preview",
    "gpt-3.5-turbo",
    "gpt-4-0125-preview",
    "gpt-4-1106-preview",
    "gpt-4-vision-preview",
    "gpt-3.5-turbo-0125",
    "gpt-3.5-turbo-1106",
],

Since "gpt4o mini" is not included in this list, it will not be available when running Langflow with an environment variables file and admin login [1][2].

To resolve this, you can manually edit the OpenAIModel.py file to include "gpt4o mini" in the options array. This will ensure that the model is available regardless of how Langflow is run.

To continue talking to Dosu, mention @dosu.

dosubot[bot] avatar Jul 26 '24 00:07 dosubot[bot]

@edwinjosechittilappilly

Hey, could you try using the new version and let me know if the issue is still there? Thanks!

carlosrcoelho avatar Jul 30 '24 14:07 carlosrcoelho

Sure

On Tue, Jul 30, 2024 at 10:34 AM Carlos Coelho @.***> wrote:

@edwinjosechittilappilly https://github.com/edwinjosechittilappilly

Hey, could you try using the new version and let me know if the issue is still there? Thanks!

— Reply to this email directly, view it on GitHub https://github.com/langflow-ai/langflow/issues/2969#issuecomment-2258507916, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZ22L26K432UCIE2DAUH7TZO6P6BAVCNFSM6AAAAABLPQHJYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJYGUYDOOJRGY . You are receiving this because you were mentioned.Message ID: @.***>

edwinjosechittilappilly avatar Jul 31 '24 20:07 edwinjosechittilappilly

@edwinjosechittilappilly Do you need any assistance with this case? If not, please let us know if this issue can be closed.

carlosrcoelho avatar Aug 02 '24 12:08 carlosrcoelho

Thank you for your contribution! This issue will be closed. If you have any questions or encounter another problem, please open a new issue and we will be ready to assist you.

carlosrcoelho avatar Aug 05 '24 14:08 carlosrcoelho