Skip to content

feat: return PromptItem with metadata fields from prompts.save() #120#121

Merged
adubovik merged 1 commit into
epam:developmentfrom
kryachkow:120-prompts-metadata-model-change
Jul 8, 2026
Merged

feat: return PromptItem with metadata fields from prompts.save() #120#121
adubovik merged 1 commit into
epam:developmentfrom
kryachkow:120-prompts-metadata-model-change

Conversation

@kryachkow

@kryachkow kryachkow commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Applicable issues

Fixes #120

Description of changes

Summary

  • Add a shared ResourceItemMetadata base class exposing created_at, updated_at, etag, and author, and have FileItem, ConversationItem, and PromptItem inherit from it
  • Change prompts.save() (sync + async) to return a PromptItem instead of PromptMetadata, so callers get the resource's metadata fields (etag, timestamps, author)
  • Update README with the new PromptItem response shape and expand unit tests to assert the returned metadata fields

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…#120

Introduce a shared ResourceItemMetadata base (created_at, updated_at,
etag, author) and make prompts.save() return a PromptItem carrying these
fields instead of PromptMetadata. FileItem, ConversationItem, and
PromptItem now inherit the common metadata fields.
@kryachkow
kryachkow requested a review from adubovik as a code owner July 8, 2026 14:33
@adubovik
adubovik merged commit ef85cb2 into epam:development Jul 8, 2026
10 of 11 checks passed
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.

prompts.save() is typed to return PromptMetadata, but the actual response is item-shaped (like FileItem)

2 participants