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

Extension Methods to Instance Methods #187

Merged
merged 5 commits into from
Jun 19, 2023
Merged

Extension Methods to Instance Methods #187

merged 5 commits into from
Jun 19, 2023

Conversation

Yawolf
Copy link
Contributor

@Yawolf Yawolf commented Jun 16, 2023

In this PR we are getting rid of all extension methods for AIScope in xef-core, and defining them as instance methods, so it can provide a more straightforward and understandable API for language integration.

Previously, something like this was needed:

def foo(using scope: AIScope) = KotlinAIScope.foo(scope.kt)

Now it's more simple:

def foo(using scope: AIScope) = scope.foo

# Conflicts:
#	core/src/commonMain/kotlin/com/xebia/functional/xef/auto/DeserializerLLMAgent.kt
#	core/src/commonMain/kotlin/com/xebia/functional/xef/auto/ImageGenerationAgent.kt
#	core/src/commonMain/kotlin/com/xebia/functional/xef/auto/LLMAgent.kt
#	scala/src/main/scala/com/xebia/functional/xef/scala/auto/package.scala
Copy link
Contributor

@nomisRev nomisRev left a comment

Choose a reason for hiding this comment

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

Looks good @Yawolf! Thank you

@Yawolf Yawolf merged commit c345819 into main Jun 19, 2023
1 check passed
@Yawolf Yawolf deleted the extension-to-instance branch June 19, 2023 13:49
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.

None yet

2 participants