Skip to content

Update java, python samples for param renames #156

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 33 commits into from
May 14, 2025
Merged

Conversation

manvkaur
Copy link
Collaborator

This pull request introduces several updates across multiple components, including version upgrades, developer metadata changes, and functional improvements in Java and Python samples. Key changes include dependency updates, adjustments to assistant and chat APIs, and improvements in Cosmos DB integration.

Version and Metadata Updates:

  • Updated changelogs for v0.19.0 and v0.5.0 with release dates (CHANGELOG.md, java-library/CHANGELOG.md) [1] [2].
  • Updated developer metadata in pom.xml files, replacing existing developers with new ones (java-library/pom.xml).

Dependency Updates:

  • Upgraded azure-functions-java-library-openai to 0.5.0-preview in multiple Java samples (samples/assistant/java/pom.xml, samples/chat/java/pom.xml, samples/embeddings/java/pom.xml) [1] [2].
  • Updated Python dependencies to include azure-identity and upgraded azure-functions to >=1.24.0b1 (samples/assistant/python/requirements.txt, samples/chat/python/requirements.txt) [1] [2].

Functional Improvements:

  • Replaced ChatMessage with AssistantMessage in Java assistant and chat APIs for better alignment with functionality (samples/assistant/java/src/main/java/com/azfs/AssistantApis.java, samples/chat/java/src/main/java/com/azfs/ChatBot.java) [1] [2].
  • Updated Cosmos DB integration in Python to use DefaultAzureCredential and CosmosDbConnectionEndpoint instead of connection strings (samples/assistant/python/todo_manager.py, samples/assistant/python/local.settings.json) [1] [2].

Code Formatting and Refactoring:

  • Improved code readability by reformatting function definitions and JSON handling in Python assistant and chat APIs (samples/assistant/python/assistant_apis.py, samples/chat/python/function_app.py) [1] [2].
  • Enhanced exception messages and logging in Java embeddings generator (samples/embeddings/java/src/main/java/com/azfs/EmbeddingsGenerator.java).

@manvkaur manvkaur marked this pull request as ready for review May 12, 2025 22:14
@manvkaur manvkaur requested a review from hallvictoria May 12, 2025 22:15
@hallvictoria
Copy link
Contributor

nit: please update the Embeddings sample README -- the python sample provided still uses generic bindings. Otherwise, LGTM

@manvkaur
Copy link
Collaborator Author

nit: please update the Embeddings sample README -- the python sample provided still uses generic bindings. Otherwise, LGTM

Nice catch, Thank you, README has been updated

@manvkaur manvkaur merged commit 7d3e877 into main May 14, 2025
8 checks passed
@manvkaur manvkaur deleted the manvkaur/updateaoai branch May 14, 2025 20:35
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.

3 participants