https://kotlinlang.org logo
Join SlackCommunities
Powered by
# ai
  • a

    Alexandre Brown

    08/23/2021, 7:18 PM
    Hello, what would you guys recommend to use for image pre-processing on Kotlin ? (Equivalent to what PIL offers) I'm looking for something simple that can do what PIL did for me on Python when it came to loading raw images bytes into (m,C,H,W) matrix. If possible I'd prefer a library that is lightweight, I just need to do preprocessing of raw bytes into rgb matrix and maybe basic normalization if possible. But if there is no library just for that then I'll take whatever works. Should I try D4J or OpenCV Java or is there a better Kotlin alternative? Thanks
    z
    • 2
    • 15
  • z

    zaleslaw

    09/28/2021, 5:03 PM
    KotlinDL 0.3 Is Out With ONNX Integration, Object Detection API, 20+ New Models in ModelHub, and Many New Layers https://blog.jetbrains.com/kotlin/2021/09/kotlindl-0-3-is-out-with-onnx-integration-ob[…]etection-api-20-new-models-in-modelhub-and-many-new-layers/
    👍 9
  • b

    breandan

    11/26/2021, 12:21 AM
    https://openteams.breezy.hr/p/23ebc93efdc4
    z
    • 2
    • 1
  • a

    Alexandre Brown

    11/27/2021, 1:13 AM
    Hello, I would like to know if https://github.com/JetBrains-Research/kinference can be used in production. It says it is in active development so probably the answer is no, but I'm curious to know what is missing exactly. Can we perform inference yet? Thanks
    z
    • 2
    • 1
  • z

    zaleslaw

    01/31/2022, 7:42 AM
    I presented the 

    webinar▾

     “Object Detection and Image Recognition with Kotlin,” where I explored a deep learning library written in Kotlin, described how to detect objects of different types in images, and explained how to create a Kotlin Web Application using Ktor and KotlinDL that recognizes cars and persons on photos. I have decided there is more that I would like to share with you on the subject, and so here is an extended article. https://blog.jetbrains.com/kotlin/2022/01/object-detection-with-kotlindl-and-ktor/
    👏 3
    👏🏼 1
  • b

    Bastien Leveque

    03/11/2022, 2:23 AM
    Hey! The subject of artificial intelligence interests me greatly and I decided to get into it, first to understand how it works, I would like to be able to create a project from A to Z (not very useful, but it's fun ) of a calculator that would use an AI to respond to simple operations (it seems like a cool project to introduce myself to this field) I had the opportunity to see that kotlin offered a
    KotlinDL
    library but my goal is to do everything by myself using the least tools other than native kotlin. Do you have any documentation to advise me on the subject?
  • v

    Vivekpanchal64

    04/20/2022, 9:49 AM
    guys i have developed an app to capture video from road which i wanted to continuosly store and upload to server . but the device gets heatup too much because we are using openCv to detect optical flow and Ai model to detect vehicles. any idea how to reduce the over heat issue and make this process smooth. currently using camera 2 API.
    j
    • 2
    • 4
  • y

    Yingding Wang

    03/11/2023, 8:29 AM
    Hallo everyone, is there any kotlin library works with tensorflow lite api, which can help
    track a custom model performance
    and
    detect data drift
    at model inference for
    android
    ? For sequence model, i can not use MLkit, and would like to do the model personalization (retrain, performance measurement, model selection, drift detection) in the close loop on android device.
  • y

    youssef

    12/31/2023, 2:11 PM
    Have anyone worked with openai API's ? i am trying to transcribe a video in a multiplatform porject
    Copy code
    private fun transcribeVideo(filePath: String){
        launch {
            try {
                val transcriptionRequest = TranscriptionRequest(
                    audio = createFileSource(filePath),
                    model = ModelId("whisper-1"),
                )
                OpenaiClient.openaiClient.transcription(
                    transcriptionRequest
                ).text.also { println("qcqs $it") }
                
            } catch (e: Exception){
                eventsFlow.emit(HomeEvent.ExceptionHandler(e))
            }
        }
    }
    i got my openai Instance here
    Copy code
    object OpenaiClient {
        val openaiClient = OpenAI(
            token = "sk-QXtYdssiI0JErQsdhT3BlbkFJYapzP50lfLFAijnqcqPrA",
            logging = LoggingConfig(LogLevel.All),
        )
    }
    and i dont seem to understnad why its not working even though that the logging level is set to ALL it just prints an error saying null i just dont know what to do at this point. also it keep bring up this error: *{*"error": *{*"message": "You didn't provide an API key. You need to provide your API key in an Authorization header using Bearer auth (i.e. Authorization: Bearer YOUR_KEY), or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.", "type": "invalid_request_error", "param": null, "code": null } } Screenshot 2023-12-31 at 2.21.56 PM.png
    a
    • 2
    • 2
  • u

    ursus

    03/13/2024, 10:12 PM
    Hi, im completely new to the domain in 2024, would you still create a model from scratch, or is the status quo, unless youre google/openai/facebook, to take a pretrained model and just fine tune it? Or such thing cannot be said generally?
    r
    • 2
    • 2
  • d

    Darryl Bayliss

    03/24/2024, 6:35 PM
    Hey all, A couple of weeks ago I attended the Google Offices in London to hear about Google's new LLM models and tools built for deployment on local machines. I wondered how well it would work on Android so created a test app to try it. I also wrote a blog post to share the findings. You can find both of them below: Blog Post: https://www.darrylbayliss.net/playing-simon-says-with-gemma-and-mediapipe/ Repo: https://github.com/DarrylBayliss/Simon-Says-Android Hope you find it useful. 😄
    K 6
    g
    • 2
    • 1
  • u

    ursus

    04/21/2024, 11:42 AM
    When one chats with LLM, and the response is received word by word - how is that delivered physically to an app, is it a websocket or something different?
    r
    • 2
    • 41
  • j

    jordond

    04/26/2024, 2:08 AM
    So it seems like MLKit can't use a custom VertexAI trained AutoML Edge objection detection model. It complains about the structure being 3D instead of 2D or 4D. Is there any way around this? I tried looking into converting the model, but couldn't find anything helpful. Is there another training service out there that would work? Or does MLKit just not work with custom object detection models.
  • e

    Eugen Martynov

    05/25/2024, 12:10 PM
    is it appropriate channel to ask about JB AI?
    👌 1
  • r

    Roland Ringgenberg

    08/22/2024, 2:09 PM
    Can someone by chance point me in the right direction for a Kotlin library where concepts like PEFT and LoRA for fine-tuning and adaptation of LLMs can be addressed? Or should I just look at the the Java AI community. I see several promising Kotlin libraries for ML/AI, but I don't know where to best start? KotlinDL, multiK, the libs around datascience and the kotlin notebook, and of course kmath etc. but when I search i.e. in the Hugging Face community etc. for Kotlin all I find around i.e. transformer then point to android (next to the kotlin models of course, congrats, great step!) What about Google itself? Vertex AI, Gemini and Gemma etc. Doesn't have to be multiplatform from the start (however think about the opportunity for wasm or integrating into the Ktor ecosystem etc). But having such a great language at our fingertips and the current AI hype, where do one best start with Kotlin and AI?
  • o

    Orfeo Ciano

    11/13/2024, 12:50 PM
    Hello guys! I've just created a frontend for Ollama in Kotlin multiplatform. I'm planning on releasing a desktop app. If you're interested, I've got a dedicated kotlin channel here for feedback or general discussion -> https://kotlinlang.slack.com/archives/C080R0G1W5S
    🙌 1
    👀 1
  • a

    Amir H. Ebrahimnezhad

    01/05/2025, 4:50 PM
    Hey guys! I've been using Cortex.cpp (https://github.com/janhq/cortex.cpp) which is basically a backend that runs different models. It's a new project and it lacks API libraries to interact with using programming languages (you should make http requests directly and there's no layer of abstraction). Any way I am spending some time now developing a kotlin based library which provides easy access to it. I'd appreciate support for the library and contributors with better knowledge of Ai and Cortex.cpp (since I'm a physics student I don't necessary know everything about it). Here's my project: https://github.com/thisismeamir/Kortex.cpp
    g
    • 2
    • 1
  • g

    Gabriel Duncan

    01/14/2025, 6:35 PM
    Hey everyone! I love Kotlin. I built my whole company on top of it, but as the LLM world had gotten into full swing, it is disheartening to see that my company is pressured more and more into relying on python. I personally feel like the ergonomics and readability of Kotlin are light years ahead of python, but the market is not looking good for kotlin in this quickly evolving space. I fear that Kotlin will lose relevance if Python eats it’s lunch
    p
    k
    • 3
    • 10
  • g

    Gabriel Duncan

    01/14/2025, 6:37 PM
    i would love to see JB take AI more seriously
  • l

    llllllllll

    01/14/2025, 11:00 PM
    Hi everyone! Working on a personal research project on Kotlin's potential for developing AI applications. It would be great if some of you who tried to work on such project could take maybe 10 minutes to fill out this survey. SURVEY LINK HERE Thank you all!
    a
    • 2
    • 3
  • k

    Kazik Pogoda

    01/21/2025, 11:24 AM
    I love Kotlin, and despite lack of tooling, I believe it's actually one of the most potent languages when it comes to AI based development, where my claudine AI agent is writing majority of the code. Kotlin code generated by Anthropic's models is usually flawless, allowing me to generate complete Kotlin based products in the span of minutes. The fact that Kotlin is a compiled language, allows to detect problems very early, and lets LLM correct them. When working in typical TDD workflow: • I load the whole project source code into the token window. • Then I ask AI to generate a suite of comprehensive test cases for the requested feature, under my supervision, and Kotlin based DSLs are unbelievably practical in this case. • Then we proceed with implementation, which might involve thousands lines of code. With each iteration AI agent can execute the build and verify the outcome in the feedback loop. Sometimes it's going in circles. Sometimes I need to intervene. Sometimes it is forgetting some test case and removing it for no reason from the code. Working with version control during iterations is crucial. However, overall, it is order of magnitude more efficient workflow than me implementing a complete product or library myself. I wonder how are you using AI in your Kotlin projects?
    😯 1
    g
    c
    • 3
    • 5
  • d

    darkmoon_uk

    01/28/2025, 6:19 AM
    Hottest OpenAI-compatible Client Library for Kotlin? 🔥 K I was using
    aallam/openai-kotlin
    here but its maintenance has dropped kodee sad - trying to decide whether to jump ship or Fork it 🛠️
    p
    • 2
    • 1
  • c

    cherron

    02/01/2025, 8:07 PM
    Has anybody here been granted access to the Junie EAP? Assuming you are able to discuss your experience so far, what are your initial impressions? (Particularly from the perspective of Kotlin development).
    👍 3
    👀 1
    d
    a
    +2
    • 5
    • 18
  • c

    chislett

    02/17/2025, 3:58 PM
    https://kotlinlang.slack.com/archives/C0922A726/p1739797905415849
    kodee happy 2
    K 2
  • e

    Erik Dreyer

    03/05/2025, 2:36 PM
    I seem to constantly run into an issue when using Jetbrains AI, or testing out Junie, that the underlying models downgrade various kotlin libraries or other various dependencies simply because they don't know new versions exist. I wonder if there were a way to get these products to have them check various repositories to validate the versions before sending a response back. For example, I used the KMP project generator to stub out a new project for me. The first thing Junie did was to downgrade it from kotlin 2.1.0 to 1.9
  • k

    Kazik Pogoda

    03/05/2025, 2:47 PM
    This is due to knowledge cutoff. Depending if Claude Sonnet 3.5 or 3.7 is in use, it will be April or October 2024 respectively. To certain extent it can be fixed with proper information in system prompt or token window: 1. which time is now (not sure if Junie is adding that, my Claudine is): https://github.com/xemantic/claudine/blob/main/src/commonMain/kotlin/Environment.kt 2. loading file containing current versions (e.g. libs.versions.toml) into the token window before doing any refactoring (preferred anyway - to load all the source code into the token window first) 3. providing either the newest version specs in system prompt, or adding a tool for the model to check them. I would say that most of the time 1 + 2 works the best. When I work with my Claludine, I instruct it to load the whole source code of the project into the token window first (and hopefully cache it), and only then continue with changes. I am pretty sure that Junie can be prompted to do the same, however, if it is loading a single file instead of multiple files in a single step via a tool, it will be still quite inefficient.
  • s

    Sahil

    03/11/2025, 6:34 AM
    Hey everyone I'm building Build That Idea – a platform that lets anyone build GPT wrappers in 60 seconds How it works: - Define your GPT - Choose a base LLM (OpenAI, Claude, DeepSeek, etc.) - Upload knowledge base - Set pricing and start making money Right now, it's just a waitlist, but I'd love feedback on the idea. Would you use something like this? What features would be useful?
  • d

    darkmoon_uk

    03/18/2025, 9:17 PM
    alphabet white question Any tools aimed at running an LLM processing prompt over multiple files in a more formal fashion? I've been having a frustrating time trying to get Agentic AI to perform 'simple' batch-processing tasks. Example: Getting an AI to take on the job of cleaning up unwanted comments, improve a few simple code cleanliness issues that are just a cut above what IDE reformatting can do. Each AI solution I've tried so far: • Warp AI (Best so far despite being aimed at command line, required much manual intervention to approve changes, eventually gave up) • Junie ('Plans' to do all files but gives up easily after a couple no matter how much you implore it to do all) • Block Goose (Hopeless, dumb as a sack of bricks at nearly every task asked of it) ...the common theme is that many current agents are really poor at completing batches of changes even when it's an ostensibly simple loop over a few files. Feeling like building something, but this must be a solved problem(?)
    a
    • 2
    • 2
  • a

    Ayfri

    04/04/2025, 12:36 PM
    https://github.com/openai/openai-java fun fact, the OpenAI SDK for Java is made in Kotlin
    K 3
    p
    k
    • 3
    • 5
  • p

    Pat

    05/01/2025, 12:26 PM
    Hi, Anyone interested in helping me with a Kotlin KMP implementation of the new Google A2A protocol (https://github.com/google/A2A)? Just started https://github.com/a2a-4k/a2a-4k so any help or feedback would be appreciated.