Skip to content

OpenAI inference request refactor + doc fix #4064

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

Closed
wants to merge 2 commits into from

Conversation

l-trotta
Copy link
Contributor

@l-trotta l-trotta commented Mar 24, 2025

Avoiding exporting classes from Request files, also chunking_settings is only available for text embedding (not sure if that's the right way to write it, feel free to rewrite!)

@l-trotta l-trotta changed the title OpenAI inference request refactor OpenAI inference request refactor + doc fix Mar 24, 2025
Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
inference.chat_completion_unified Missing test Missing test
inference.completion Missing test Missing test
inference.delete Missing test Missing test
inference.get 🟢 1/1 1/1
inference.put_eis Missing test Missing test
inference.put_mistral 🟠 Missing type Missing type
inference.put_openai Missing test Missing test
inference.put_voyageai Missing test Missing test
inference.put_watsonx Missing test Missing test
inference.put Missing test Missing test
inference.rerank Missing test Missing test
inference.sparse_embedding Missing test Missing test
inference.stream_completion Missing test Missing test
inference.text_embedding Missing test Missing test
inference.update Missing test Missing test

You can validate these APIs yourself by using the make validate target.

@pquentin
Copy link
Member

I fixed the immediate conflict, but I suspect this refactor should apply to Azure OpenAI too: https://github.com/elastic/elasticsearch-specification/blob/main/specification/inference/put_azureopenai/PutAzureOpenAiRequest.ts

Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
inference.chat_completion_unified Missing test Missing test
inference.completion Missing test Missing test
inference.delete Missing test Missing test
inference.get 🟢 1/1 1/1
inference.post_eis_chat_completion Missing test Missing test
inference.put_alibabacloud Missing test Missing test
inference.put_amazonbedrock Missing test Missing test
inference.put_anthropic Missing test Missing test
inference.put_azureaistudio Missing test Missing test
inference.put_azureopenai Missing test Missing test
inference.put_cohere Missing test Missing test
inference.put_eis Missing test Missing test
inference.put_elasticsearch Missing test Missing test
inference.put_elser Missing test Missing test
inference.put_googleaistudio Missing test Missing test
inference.put_googlevertexai Missing test Missing test
inference.put_hugging_face Missing test Missing test
inference.put_jinaai Missing test Missing test
inference.put_mistral Missing test Missing test
inference.put_openai Missing test Missing test
inference.put_voyageai Missing test Missing test
inference.put_watsonx Missing test Missing test
inference.put Missing test Missing test
inference.rerank Missing test Missing test
inference.sparse_embedding Missing test Missing test
inference.stream_completion Missing test Missing test
inference.text_embedding Missing test Missing test
inference.update Missing test Missing test

You can validate these APIs yourself by using the make validate target.

@l-trotta
Copy link
Contributor Author

@pquentin found out after creating this that we want to wait to actually fix the docs, right now we want them to match the original ones, so this will be merged in the following releases

@l-trotta
Copy link
Contributor Author

closing as this will have too many conflicts now, will open a new one

@l-trotta l-trotta closed this Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants