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

Scala examples refactor #514

Merged
merged 3 commits into from
Nov 1, 2023
Merged

Scala examples refactor #514

merged 3 commits into from
Nov 1, 2023

Conversation

L-Lavigne
Copy link
Collaborator

This PR refactors the Scala examples, in preparation for eventually aligning all Scala and Java examples with their Kotlin counterparts.

Summary of changes:

  • Consolidated similar Scala examples together and re-organized their package structure to better express their purpose.
  • Refactored the Scala examples to use a more concise, more idiomatic Scala 3 style.
  • Partly re-wrote the Scala readme, which was referencing outdated ai and AIScope constructs.
  • Moved some Scala classes from the conversation to the serialization package and cleaned up the code a bit.
  • Added convenience overloads of all prompt methods that take a String instead of a Prompt object.
  • Applied minor grammar/syntax fixes in Scala-related code and docs.

Note: I don't have a SerpAPI access token so I was unable to fully test the examples that rely on this. (I did group them in a context.serpapi subpackage and added a note in the Readme about the token requirement). If anyone has a token available and can help with testing these please let me know.

Copy link
Contributor

@raulraja raulraja left a comment

Choose a reason for hiding this comment

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

This looks awesome @L-Lavigne , thank you for looking into it.
Now that I recall our previous conversations I'm wondering if Xef is usable inside Minecraft!. 🍻

@L-Lavigne
Copy link
Collaborator Author

L-Lavigne commented Oct 31, 2023

This looks awesome @L-Lavigne , thank you for looking into it. Now that I recall our previous conversations I'm wondering if Xef is usable inside Minecraft!. 🍻

Thanks @raulraja , it'll be good to work with you and @juanpedromoreno again! Maybe I'm going to add a Minecraft-related example or two. :-D

Are we good to merge or do we need another approver?

@L-Lavigne L-Lavigne added documentation Improvements or additions to documentation enhancement New feature or request openAI Prompts scala labels Oct 31, 2023
@L-Lavigne L-Lavigne merged commit 1ddcfb1 into main Nov 1, 2023
5 checks passed
@L-Lavigne L-Lavigne deleted the scala-examples-refactor branch November 1, 2023 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request openAI Prompts scala
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants