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

Add ML procs for Azure OpenAI service & AWS SageMaker Endpoints #3634

Closed
jexp opened this issue Jun 19, 2023 · 1 comment
Closed

Add ML procs for Azure OpenAI service & AWS SageMaker Endpoints #3634

jexp opened this issue Jun 19, 2023 · 1 comment
Assignees

Comments

@jexp
Copy link
Member

jexp commented Jun 19, 2023

Probably just a config setting for the regular openai service?

in python it needs:


openai.api_type = "azure" #I use Azure OpenAI. You might need to comment if you use the non-Azure instance
openai.api_base = os.getenv('OPENAI_API_BASE')
openai.api_version = os.getenv('OPENAI_API_VERSION')
openai.api_key = os.getenv('OPENAI_API_KEY')```

For Sagemaker, figure out the endpoints via langchain?


https://api.python.langchain.com/en/latest/modules/embeddings.html#langchain.embeddings.SagemakerEndpointEmbeddings
@jexp
Copy link
Member Author

jexp commented Sep 16, 2023

Azure openai should work the same as OpenAi endpoints, they just have an extra query string for API version.

Either add a specific implementation for it, where the user can also pass in the version as config.

Or reuse the openai implementation change it to support a placeholder for {path} in the URL base-string, instead of concatenating it just at the end of the URL:

so for an MSFT API like:

https://xxx-openai.openai.azure.com/openai/deployments/xxx-gpt-35/completions?api-version=2022-12-01

consider using a base-url like:

apoc.ml.openai.url=https://xxx-openai.openai.azure.com/openai/deployments/xxx-gpt-35/{path}?api-version=2022-12-01

for openai then use

https://platform.openai.com/docs/api-reference/{path}

but still support the old way if no {path} placeholder is in the base-URL

conker84 added a commit that referenced this issue Dec 4, 2023
* Fixes #3634: Updated ML procs for Azure OpenAI services

* Code clean

* added enpoint env vars

* Code clean part 2

* removed unused imports

---------

Co-authored-by: Andrea Santurbano <santand@gmail.com>
vga91 added a commit that referenced this issue Dec 18, 2023
* Fixes #3634: Updated ML procs for Azure OpenAI services

* Code clean

* added enpoint env vars

* Code clean part 2

* removed unused imports

---------

Co-authored-by: Andrea Santurbano <santand@gmail.com>
vga91 added a commit that referenced this issue Dec 18, 2023
* Fixes #3634: Updated ML procs for Azure OpenAI services

* Code clean

* added enpoint env vars

* Code clean part 2

* removed unused imports

---------

Co-authored-by: Andrea Santurbano <santand@gmail.com>
vga91 added a commit to vga91/neo4j-apoc-procedures that referenced this issue Dec 19, 2023
conker84 pushed a commit that referenced this issue Dec 20, 2023
* Fixes #3634: Add ML procs for AWS SageMaker Endpoints

* fix compile problems after rebase

* fix StartupExtendedTest error with sagemaker
vga91 added a commit that referenced this issue Dec 21, 2023
* Fixes #3634: Add ML procs for AWS SageMaker Endpoints

* fix compile problems after rebase

* fix StartupExtendedTest error with sagemaker
vga91 added a commit that referenced this issue Dec 22, 2023
* Fixes #3634: Add ML procs for AWS SageMaker Endpoints

* fix compile problems after rebase

* fix StartupExtendedTest error with sagemaker
vga91 added a commit that referenced this issue Dec 22, 2023
* Fixes #3634: Updated ML procs for Azure OpenAI services

* Code clean

* added enpoint env vars

* Code clean part 2

* removed unused imports

---------

Co-authored-by: Andrea Santurbano <santand@gmail.com>
vga91 added a commit that referenced this issue Jan 10, 2024
* Fixes #3634: Add ML procs for AWS SageMaker Endpoints

* fix compile problems after rebase

* fix StartupExtendedTest error with sagemaker
vga91 added a commit that referenced this issue Jan 10, 2024
* Fixes #3634: Updated ML procs for Azure OpenAI services

* Code clean

* added enpoint env vars

* Code clean part 2

* removed unused imports

---------

Co-authored-by: Andrea Santurbano <santand@gmail.com>
@jexp jexp closed this as completed Jan 11, 2024
vga91 added a commit that referenced this issue Jan 11, 2024
* Fixes #3634: Add ML procs for AWS SageMaker Endpoints

* fix compile problems after rebase

* fix StartupExtendedTest error with sagemaker
vga91 added a commit that referenced this issue Jan 11, 2024
* Fixes #3634: Updated ML procs for Azure OpenAI services

* Code clean

* added enpoint env vars

* Code clean part 2

* removed unused imports

---------

Co-authored-by: Andrea Santurbano <santand@gmail.com>
vga91 added a commit that referenced this issue Jan 11, 2024
… (#3885)

* Fixes #3634: Updated ML procs for Azure OpenAI services

* Code clean

* added enpoint env vars

* Code clean part 2

* removed unused imports

---------

Co-authored-by: Andrea Santurbano <santand@gmail.com>
vga91 added a commit that referenced this issue Jan 15, 2024
* Fixes #3634: Add ML procs for AWS SageMaker Endpoints

* fix compile problems after rebase

* fix StartupExtendedTest error with sagemaker
vga91 added a commit that referenced this issue Jan 17, 2024
* Fixes #3634: Add ML procs for AWS SageMaker Endpoints

* fix compile problems after rebase

* fix StartupExtendedTest error with sagemaker
vga91 added a commit that referenced this issue Jan 19, 2024
… (#3885)

* Fixes #3634: Updated ML procs for Azure OpenAI services

* Code clean

* added enpoint env vars

* Code clean part 2

* removed unused imports

---------

Co-authored-by: Andrea Santurbano <santand@gmail.com>
vga91 added a commit that referenced this issue Jan 23, 2024
… (#3885)

* Fixes #3634: Updated ML procs for Azure OpenAI services

* Code clean

* added enpoint env vars

* Code clean part 2

* removed unused imports

---------

Co-authored-by: Andrea Santurbano <santand@gmail.com>
vga91 added a commit that referenced this issue Jan 23, 2024
* Fixes #3634: Add ML procs for AWS SageMaker Endpoints

* fix compile problems after rebase

* fix StartupExtendedTest error with sagemaker
vga91 added a commit that referenced this issue Jan 23, 2024
… (#3885) (#3903)

* Fixes #3634: Updated ML procs for Azure OpenAI services

* Code clean

* added enpoint env vars

* Code clean part 2

* removed unused imports

---------

Co-authored-by: Andrea Santurbano <santand@gmail.com>
vga91 added a commit that referenced this issue Jan 23, 2024
* Fixes #3634: Add ML procs for AWS SageMaker Endpoints

* fix compile problems after rebase

* fix StartupExtendedTest error with sagemaker
vga91 added a commit that referenced this issue Jan 23, 2024
…#3908)

* Fixes #3634: Add ML procs for AWS SageMaker Endpoints

* fix compile problems after rebase

* fix StartupExtendedTest error with sagemaker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants