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

(feat/deepgramTopicDetection): Added Deepgram Topic Detection using Kotlin #98

Conversation

JayantGoel001
Copy link

@JayantGoel001 JayantGoel001 commented Oct 19, 2022

Fixes: appwrite/appwrite#4461

196659461-1db9ec42-3130-42d9-a0c3-a87e9d0dc22e

@tessamero please review it.

@JayantGoel001 JayantGoel001 changed the title (feat/deepgramTopicDetection): Added Deepgram Topic Detection (feat/deepgramTopicDetection): Added Deepgram Topic Detection using Kotlin Oct 19, 2022
@PineappleIOnic
Copy link
Contributor

Thank you so much for the PR 🤩. We're adding the hacktoberfest-accepted label to ensure this PR counts towards your Hacktoberfest contributions count. With that said, please stay active on this PR to address any comments once you receive a review. Happy Hacktoberfest! 🎃

Copy link
Contributor

@stnguyen90 stnguyen90 left a comment

Choose a reason for hiding this comment

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

Great PR! 🤯 We left some comments during the review, please check them out.

kotlin/Deepgram-Topic-Detection/README.md Outdated Show resolved Hide resolved
kotlin/Deepgram-Topic-Detection/README.md Outdated Show resolved Hide resolved
kotlin/Deepgram-Topic-Detection/Index.kt Outdated Show resolved Hide resolved
kotlin/Deepgram-Topic-Detection/Index.kt Outdated Show resolved Hide resolved
return res.json(
data = mapOf(
"success" to true,
"deepgramData" to response.toString()
Copy link
Contributor

Choose a reason for hiding this comment

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

Would you please return this as a Map rather than a string?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is still being returned as a String

Copy link
Author

Choose a reason for hiding this comment

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

Yes, It is returning response as a map now.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is not being returned as a map yet. it's still a string.

kotlin/Deepgram-Topic-Detection/README.md Outdated Show resolved Hide resolved
@JayantGoel001
Copy link
Author

Hello @stnguyen90, Please review it again.

Copy link
Contributor

@stnguyen90 stnguyen90 left a comment

Choose a reason for hiding this comment

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

@JayantGoel001 some comments haven't been addressed.

kotlin/Deepgram-Topic-Detection/README.md Outdated Show resolved Hide resolved
return res.json(
data = mapOf(
"success" to true,
"deepgramData" to response.toString()
Copy link
Contributor

Choose a reason for hiding this comment

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

This is still being returned as a String

Copy link
Contributor

@stnguyen90 stnguyen90 left a comment

Choose a reason for hiding this comment

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

Please see comments.

Comment on lines +57 to +60
return mapOf(
"success" to true,
"deepgramData" to response
)
Copy link
Contributor

Choose a reason for hiding this comment

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

You can't return mapOf like this:

$ docker run -e INTERNAL_RUNTIME_ENTRYPOINT=Index.kt --rm --interactive --tty --volume $PWD:/usr/code openruntimes/kotlin:v2-1.6 sh /usr/local/src/build.sh


Downloading https://services.gradle.org/distributions/gradle-7.4.1-bin.zip
...........10%...........20%...........30%...........40%...........50%...........60%...........70%...........80%...........90%...........100%

Welcome to Gradle 7.4.1!

Here are the highlights of this release:
 - Aggregated test and JaCoCo reports
 - Marking additional test source directories as tests in IntelliJ
 - Support for Adoptium JDKs in Java toolchains

For more details see https://docs.gradle.org/7.4.1/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)
> Task :processResources

> Task :compileKotlin FAILED
e: /usr/local/src/src/main/kotlin/io/openruntimes/kotlin/Wrapper.kt: (60, 16): Type mismatch: inferred type is Map<String, {Comparable<{Boolean & StringBuilder}> & java.io.Serializable}> but RuntimeResponse was expected
e: /usr/local/src/src/main/kotlin/io/openruntimes/kotlin/Wrapper.kt: (65, 16): Type mismatch: inferred type is Map<String, {Comparable<{Boolean & String}> & java.io.Serializable}?> but RuntimeResponse was expected

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 30s
2 actionable tasks: 2 executed

How are you testing this code?

return res.json(
data = mapOf(
"success" to true,
"deepgramData" to response.toString()
Copy link
Contributor

Choose a reason for hiding this comment

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

It is not being returned as a map yet. it's still a string.

@stnguyen90 stnguyen90 marked this pull request as draft November 14, 2022 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

⚡ Write a deepgramTopicDetection() Function using Kotlin
3 participants