Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Support for Azureopenai and openai #6

Open
RohitX0X opened this issue Mar 25, 2024 · 5 comments · May be fixed by #5
Open

Include Support for Azureopenai and openai #6

RohitX0X opened this issue Mar 25, 2024 · 5 comments · May be fixed by #5

Comments

@RohitX0X
Copy link

To not limit oneself with claude, extending support to Open AI too
raised PR for it

@RohitX0X
Copy link
Author

#5

solved here^

@RohitX0X RohitX0X linked a pull request Mar 25, 2024 that will close this issue
@magiccub04
Copy link

magiccub04 commented Mar 26, 2024

I use OpenAI model gpt-3.5-turbo-0613 to run this code but i get
Error code: 404 - {'error': {'message': 'The model API_MODEL does not exist or you do not have access to it.', 'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}}

from openai import AzureOpenAI, OpenAI
load_dotenv()
API_KEY = "OpenAI_key"  # Replace with your OpenAI API or AzureOpenAI key
client = OpenAI(api_key = API_KEY)

HOSTED_IN_AZURE_PLATFORM = False  # Make it to True/False if your service is Azure Open AI or OpenAI respectively.
if(HOSTED_IN_AZURE_PLATFORM):
    API_ENDPOINT= "<Your_Azure_API_endpoint>"
    API_MODEL="<gpt-3.5-turbo-0613>"
    API_VERSION="<Your_Azure_API_version>"

    client = AzureOpenAI(api_key = API_KEY,api_version=API_VERSION,azure_endpoint=API_ENDPOINT)

@RohitX0X
Copy link
Author

RohitX0X commented Mar 26, 2024

The issue is with client.chat completions… if you are using open ai then remove model in the create() call….

Edit: sorry, i read the error mssg wrongly ,

firstly, put API_MODEL="gpt-3.5-turbo-0613" just below the API_KEY line
Also , You need to name it as , API_MODEL="gpt-3.5-turbo-0613" instead of API_MODEL="<gpt-3.5-turbo-0613>"

@RohitX0X
Copy link
Author

Updated my PR , you can check the corrections

@arsaboo
Copy link

arsaboo commented Apr 7, 2024

May be out of scope for this PR, but can we include support for local llms (e.g., Ollama).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants