Skip to content

Update elastic search cookbook to use latest API #1899

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

Merged
merged 2 commits into from
Jun 16, 2025
Merged

Conversation

robtinn
Copy link
Contributor

@robtinn robtinn commented Jun 13, 2025

Summary

Upgrade completions API to responses API.

Motivation

I was working through elastic search integration with OpenAI and upgrading this to Responses would be greatly beneficial to many teams.


For new content

When contributing new content, read through our contribution guidelines, and mark the following action items as completed:

  • I have added a new entry in registry.yaml (and, optionally, in authors.yaml) so that my content renders on the cookbook website.
  • I have conducted a self-review of my content based on the contribution guidelines:
    • Relevance: This content is related to building with OpenAI technologies and is useful to others.
    • Uniqueness: I have searched for related examples in the OpenAI Cookbook, and verified that my content offers new insights or unique information compared to existing documentation.
    • Spelling and Grammar: I have checked for spelling or grammatical mistakes.
    • Clarity: I have done a final read-through and verified that my submission is well-organized and easy to understand.
    • Correctness: The information I include is correct and all of my code executes successfully.
    • Completeness: I have explained everything fully, including all necessary references and citations.

We will rate each of these areas on a scale from 1 to 4, and will only accept contributions that score 3 or higher on all areas. Refer to our contribution guidelines for more details.

@robtinn robtinn requested a review from pap-openai June 13, 2025 13:39
@robtinn robtinn changed the title Update elastic search cookbook to use responses API Update elastic search cookbook to use latest API Jun 16, 2025
@pap-openai
Copy link
Contributor

Looks good (new embeddings/SDK) but is this using the new Response API? I don't see any model responses/completions but might have miss them

Also we might want to not update the date as it'll show up as new content and I think the original post date is more important than updated one, we could maybe have an optional field for updated_date to reflect this in the future but will require some updates on the website (cc @lspacagna-oai)

registry.yaml Outdated
@@ -861,12 +861,12 @@

- title: Semantic search using Elasticsearch and OpenAI
path: examples/vector_databases/elasticsearch/elasticsearch-semantic-search.ipynb
date: 2023-08-29
date: 2025-06-13
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't change it

@robtinn robtinn merged commit 7379f40 into main Jun 16, 2025
1 check passed
@robtinn robtinn deleted the rtinn/elastic branch June 16, 2025 15:01
@robtinn
Copy link
Contributor Author

robtinn commented Jun 17, 2025

Looks good (new embeddings/SDK) but is this using the new Response API? I don't see any model responses/completions but might have miss them

Also we might want to not update the date as it'll show up as new content and I think the original post date is more important than updated one, we could maybe have an optional field for updated_date to reflect this in the future but will require some updates on the website (cc @lspacagna-oai)

Good point pap about having an optional field. I put up a draft PR for the website for this, let me know if you have any thoughts.

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 this pull request may close these issues.

2 participants