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

Move ai block to xef-kotlin module #225

Merged
merged 1 commit into from
Jul 4, 2023
Merged

Conversation

raulraja
Copy link
Contributor

@raulraja raulraja commented Jul 4, 2023

This PR includes the following changes and removes the need to merge #224

  • In the file AI.kt:

    • Removed the AI type alias declaration.
    • Removed the inline function ai.
  • In the file Gpt4AllRuntime.kt:

    • Removed unused imports.
    • Updated the implementation of the toEither function to use the Either.catchOrThrow operator instead of the ai function.
    • Removed the unused import and the ai function.
  • Added a new file DSLExtensions.kt to the kotlin/src/commonMain/kotlin/com/xebia/functional/xef/auto directory, which contains:

    • A new inline function ai that provides a DSL block for constructing AI values.
  • In the file OpenAIRuntime.kt:

    • Removed unused imports.
    • Updated the implementation of the toEither function to use the Either.catchOrThrow operator instead of the ai function.
    • Removed the @OptIn(ExperimentalTime::class) annotation.

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! I think the AI<A> alias can also be moved.

Two unrelated comments to this PR but my eye fel on it. Can be fixed here, or in a subsequent PR.

Copy link
Contributor

@Yawolf Yawolf left a comment

Choose a reason for hiding this comment

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

Once Simon's suggestion are done 🙂

@raulraja raulraja merged commit 81ce22c into main Jul 4, 2023
@raulraja raulraja deleted the kotlin-specifics-out-of-core branch July 4, 2023 09:46
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