Showing preview only (6,187K chars total). Download the full file or copy to clipboard to get everything.
Repository: NexaAI/nexa-sdk
Branch: main
Commit: 9b0e5e6d8d93
Files: 489
Total size: 5.8 MB
Directory structure:
gitextract_dr3ob_1u/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.yml
│ │ ├── feature_request.yml
│ │ └── model_request.yml
│ └── workflows/
│ ├── build-linux.yml
│ ├── build-macos.yml
│ ├── build-windows.yml
│ ├── lint.yml
│ └── test.yml
├── .gitignore
├── LICENSE
├── NOTICE
├── README.md
├── README_zh.md
├── bindings/
│ ├── android/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── README_zh.md
│ │ ├── app/
│ │ │ ├── .gitignore
│ │ │ ├── build.gradle.kts
│ │ │ ├── libs/
│ │ │ │ ├── okdownload-core.aar
│ │ │ │ ├── okdownload-ktx.aar
│ │ │ │ ├── okdownload-okhttp.aar
│ │ │ │ └── okdownload-sqlite.aar
│ │ │ ├── proguard-rules.pro
│ │ │ ├── src/
│ │ │ │ ├── androidTest/
│ │ │ │ │ └── java/
│ │ │ │ │ └── com/
│ │ │ │ │ └── nexa/
│ │ │ │ │ └── demo/
│ │ │ │ │ └── ExampleInstrumentedTest.kt
│ │ │ │ ├── main/
│ │ │ │ │ ├── AndroidManifest.xml
│ │ │ │ │ ├── assets/
│ │ │ │ │ │ └── model_list.json
│ │ │ │ │ ├── java/
│ │ │ │ │ │ └── com/
│ │ │ │ │ │ └── nexa/
│ │ │ │ │ │ └── demo/
│ │ │ │ │ │ ├── ChatAdapter.kt
│ │ │ │ │ │ ├── FileConfig.kt
│ │ │ │ │ │ ├── GenerationConfigSample.kt
│ │ │ │ │ │ ├── MainActivity.kt
│ │ │ │ │ │ ├── MyApplication.kt
│ │ │ │ │ │ ├── activity/
│ │ │ │ │ │ │ └── FileContentActivity.kt
│ │ │ │ │ │ ├── bean/
│ │ │ │ │ │ │ ├── DownloadFileConfig.kt
│ │ │ │ │ │ │ ├── DownloadState.kt
│ │ │ │ │ │ │ ├── DownloadableFile.kt
│ │ │ │ │ │ │ ├── ModelData.kt
│ │ │ │ │ │ │ ├── NexaManifestBean.kt
│ │ │ │ │ │ │ └── S3FileBean.kt
│ │ │ │ │ │ ├── listeners/
│ │ │ │ │ │ │ └── CustomDialogInterface.kt
│ │ │ │ │ │ ├── ui/
│ │ │ │ │ │ │ └── theme/
│ │ │ │ │ │ │ ├── Color.kt
│ │ │ │ │ │ │ ├── Theme.kt
│ │ │ │ │ │ │ └── Type.kt
│ │ │ │ │ │ └── utils/
│ │ │ │ │ │ ├── BugFixTest.kt
│ │ │ │ │ │ ├── ExecShell.java
│ │ │ │ │ │ ├── ImgUtil.kt
│ │ │ │ │ │ ├── KeyboardUtil.kt
│ │ │ │ │ │ ├── KotlinUtil.kt
│ │ │ │ │ │ ├── MD5Utils.kt
│ │ │ │ │ │ ├── ModelFileListingUtil.kt
│ │ │ │ │ │ ├── PermissionUtil.kt
│ │ │ │ │ │ ├── SharePreferenceKeys.kt
│ │ │ │ │ │ └── WavRecorder.kt
│ │ │ │ │ └── res/
│ │ │ │ │ ├── color/
│ │ │ │ │ │ └── btn_enable_color.xml
│ │ │ │ │ ├── drawable/
│ │ │ │ │ │ ├── bg_ai_message.xml
│ │ │ │ │ │ ├── bg_audio_background.xml
│ │ │ │ │ │ ├── bg_input_box_background.xml
│ │ │ │ │ │ ├── bg_user_message.xml
│ │ │ │ │ │ ├── btn_rounded_black_bg_18.xml
│ │ │ │ │ │ ├── btn_rounded_border.xml
│ │ │ │ │ │ ├── btn_rounded_border_18.xml
│ │ │ │ │ │ ├── btn_rounded_border_gray.xml
│ │ │ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ │ │ ├── ic_launcher_foreground.xml
│ │ │ │ │ │ ├── icon_back.xml
│ │ │ │ │ │ ├── icon_close.xml
│ │ │ │ │ │ ├── icon_database.xml
│ │ │ │ │ │ └── icon_file.xml
│ │ │ │ │ ├── layout/
│ │ │ │ │ │ ├── activity_file_content.xml
│ │ │ │ │ │ ├── activity_main.xml
│ │ │ │ │ │ ├── dialog_select_plugin_id.xml
│ │ │ │ │ │ ├── item_ai_message.xml
│ │ │ │ │ │ ├── item_assistant_image_message.xml
│ │ │ │ │ │ ├── item_audio_scroll.xml
│ │ │ │ │ │ ├── item_image_item_message.xml
│ │ │ │ │ │ ├── item_image_message.xml
│ │ │ │ │ │ ├── item_image_scroll.xml
│ │ │ │ │ │ ├── item_model.xml
│ │ │ │ │ │ ├── item_profile_message.xml
│ │ │ │ │ │ ├── item_user_message.xml
│ │ │ │ │ │ └── menu_layout.xml
│ │ │ │ │ ├── mipmap-anydpi-v26/
│ │ │ │ │ │ ├── ic_launcher.xml
│ │ │ │ │ │ └── ic_launcher_round.xml
│ │ │ │ │ ├── values/
│ │ │ │ │ │ ├── colors.xml
│ │ │ │ │ │ ├── strings.xml
│ │ │ │ │ │ └── themes.xml
│ │ │ │ │ └── xml/
│ │ │ │ │ ├── backup_rules.xml
│ │ │ │ │ ├── data_extraction_rules.xml
│ │ │ │ │ └── file_paths.xml
│ │ │ │ └── test/
│ │ │ │ └── java/
│ │ │ │ └── com/
│ │ │ │ └── nexa/
│ │ │ │ └── demo/
│ │ │ │ └── ExampleUnitTest.kt
│ │ │ └── test
│ │ ├── build.gradle.kts
│ │ ├── gradle/
│ │ │ ├── libs.versions.toml
│ │ │ └── wrapper/
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ │ ├── gradle.properties
│ │ ├── gradlew
│ │ ├── gradlew.bat
│ │ ├── settings.gradle.kts
│ │ └── transform/
│ │ ├── .gitignore
│ │ ├── build.gradle.kts
│ │ ├── consumer-rules.pro
│ │ ├── proguard-rules.pro
│ │ └── src/
│ │ ├── androidTest/
│ │ │ └── java/
│ │ │ └── ai/
│ │ │ └── nexa/
│ │ │ └── transform/
│ │ │ └── ExampleInstrumentedTest.kt
│ │ ├── main/
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java/
│ │ │ └── ai/
│ │ │ └── nexa/
│ │ │ └── transform/
│ │ │ ├── DownloadUtils.kt
│ │ │ ├── ImageUtils.kt
│ │ │ └── VlmContentTransfer.kt
│ │ └── test/
│ │ └── java/
│ │ └── ai/
│ │ └── nexa/
│ │ └── transform/
│ │ └── ExampleUnitTest.kt
│ ├── ios/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ └── README_zh.md
│ └── python/
│ ├── .gitignore
│ ├── README.md
│ ├── README_env_setup.md
│ ├── README_zh.md
│ ├── asr.py
│ ├── cv_ocr.py
│ ├── diarize.py
│ ├── embedder.py
│ ├── env_setup.ps1
│ ├── image_gen.py
│ ├── llm.py
│ ├── models.py
│ ├── notebook/
│ │ ├── macos.ipynb
│ │ ├── windows(arm64).ipynb
│ │ └── windows(x64).ipynb
│ ├── rerank.py
│ ├── tts.py
│ └── vlm.py
├── cookbook/
│ ├── .gitignore
│ ├── PC/
│ │ ├── Agent-Granite/
│ │ │ ├── Python-Binding-Example/
│ │ │ │ ├── README.md
│ │ │ │ ├── agent_nexa.py
│ │ │ │ ├── gradio_ui.py
│ │ │ │ └── requirements.txt
│ │ │ ├── README.md
│ │ │ └── Serve-Example/
│ │ │ ├── README.md
│ │ │ ├── agent_nexa.py
│ │ │ ├── gradio_ui.py
│ │ │ └── requirements.txt
│ │ ├── Multimodal-Qwen3VL/
│ │ │ ├── Python-Binding-Example/
│ │ │ │ ├── gradio_ui.py
│ │ │ │ ├── vlm_service.py
│ │ │ │ └── vlm_viewmodel.py
│ │ │ └── README.md
│ │ ├── RAG-LLM/
│ │ │ ├── Python-Binding-Example/
│ │ │ │ ├── README.md
│ │ │ │ ├── gradio_ui.py
│ │ │ │ └── rag_nexa.py
│ │ │ ├── README.md
│ │ │ └── Serve-Example/
│ │ │ ├── README.md
│ │ │ ├── gradio_ui.py
│ │ │ └── rag_nexa.py
│ │ ├── RAG-VLM/
│ │ │ ├── .gitignore
│ │ │ ├── README.md
│ │ │ ├── gradio_ui.py
│ │ │ ├── rag_nexa.py
│ │ │ └── requirements.txt
│ │ ├── Web-Agent-Qwen3VL/
│ │ │ └── README.md
│ │ ├── function-calling/
│ │ │ ├── .gitignore
│ │ │ ├── README.md
│ │ │ ├── app/
│ │ │ │ ├── flask_ui.py
│ │ │ │ ├── image_utils.py
│ │ │ │ └── templates/
│ │ │ │ └── chat.html
│ │ │ ├── main.py
│ │ │ └── requirements.txt
│ │ └── live-translate/
│ │ ├── README.md
│ │ ├── app.py
│ │ ├── index.html
│ │ └── requirements.txt
│ ├── README.md
│ ├── README_zh.md
│ ├── ag2/
│ │ ├── README.md
│ │ ├── example.py
│ │ └── requirements.txt
│ ├── android/
│ │ └── RAG-LLM/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── app/
│ │ │ ├── .gitignore
│ │ │ ├── build.gradle.kts
│ │ │ ├── libs/
│ │ │ │ ├── okdownload-core.aar
│ │ │ │ ├── okdownload-ktx.aar
│ │ │ │ ├── okdownload-okhttp.aar
│ │ │ │ └── okdownload-sqlite.aar
│ │ │ ├── proguard-rules.pro
│ │ │ ├── src/
│ │ │ │ ├── androidTest/
│ │ │ │ │ └── java/
│ │ │ │ │ └── com/
│ │ │ │ │ └── nexa/
│ │ │ │ │ └── demo/
│ │ │ │ │ └── ExampleInstrumentedTest.kt
│ │ │ │ ├── main/
│ │ │ │ │ ├── AndroidManifest.xml
│ │ │ │ │ ├── assets/
│ │ │ │ │ │ └── model_list.json
│ │ │ │ │ ├── java/
│ │ │ │ │ │ └── com/
│ │ │ │ │ │ └── nexa/
│ │ │ │ │ │ └── demo/
│ │ │ │ │ │ ├── ChatAdapter.kt
│ │ │ │ │ │ ├── FileConfig.kt
│ │ │ │ │ │ ├── GenerationConfigSample.kt
│ │ │ │ │ │ ├── MainActivity.kt
│ │ │ │ │ │ ├── MyApplication.kt
│ │ │ │ │ │ ├── RAGConfig.kt
│ │ │ │ │ │ ├── activity/
│ │ │ │ │ │ │ ├── FileContentActivity.kt
│ │ │ │ │ │ │ └── FolderActivity.kt
│ │ │ │ │ │ ├── adapter/
│ │ │ │ │ │ │ ├── ChunkAdapter.kt
│ │ │ │ │ │ │ ├── IndexViewPagerAdapter.kt
│ │ │ │ │ │ │ ├── SelectImagesAdapter.kt
│ │ │ │ │ │ │ ├── SelectVideosAdapter.kt
│ │ │ │ │ │ │ └── ShowFileDirAdapter.kt
│ │ │ │ │ │ ├── bean/
│ │ │ │ │ │ │ ├── DownloadFileConfig.kt
│ │ │ │ │ │ │ ├── DownloadState.kt
│ │ │ │ │ │ │ ├── DownloadableFile.kt
│ │ │ │ │ │ │ ├── EmbedFileBean.kt
│ │ │ │ │ │ │ ├── EmbedResultBean.kt
│ │ │ │ │ │ │ ├── IndexSelectedDirBean.kt
│ │ │ │ │ │ │ ├── ModelData.kt
│ │ │ │ │ │ │ ├── NexaManifestBean.kt
│ │ │ │ │ │ │ └── S3FileBean.kt
│ │ │ │ │ │ ├── fragments/
│ │ │ │ │ │ │ ├── IndexFragment.kt
│ │ │ │ │ │ │ ├── IndexedImagesFragment.kt
│ │ │ │ │ │ │ ├── IndexedVideosFragment.kt
│ │ │ │ │ │ │ └── UpdatePercentFragment.kt
│ │ │ │ │ │ ├── listeners/
│ │ │ │ │ │ │ └── CustomDialogInterface.kt
│ │ │ │ │ │ ├── ui/
│ │ │ │ │ │ │ └── theme/
│ │ │ │ │ │ │ ├── Color.kt
│ │ │ │ │ │ │ ├── Theme.kt
│ │ │ │ │ │ │ └── Type.kt
│ │ │ │ │ │ ├── utils/
│ │ │ │ │ │ │ ├── BugFixTest.kt
│ │ │ │ │ │ │ ├── DensityUtil.kt
│ │ │ │ │ │ │ ├── ExecShell.java
│ │ │ │ │ │ │ ├── GenerateEmbedStringsUtil.kt
│ │ │ │ │ │ │ ├── ImgUtil.kt
│ │ │ │ │ │ │ ├── KeyboardUtil.kt
│ │ │ │ │ │ │ ├── KotlinUtil.kt
│ │ │ │ │ │ │ ├── MD5Utils.kt
│ │ │ │ │ │ │ ├── ModelFileListingUtil.kt
│ │ │ │ │ │ │ ├── PermissionUtil.kt
│ │ │ │ │ │ │ ├── SharePreferenceKeys.kt
│ │ │ │ │ │ │ └── WavRecorder.kt
│ │ │ │ │ │ └── widget/
│ │ │ │ │ │ └── WrapRadioGroup.kt
│ │ │ │ │ └── res/
│ │ │ │ │ ├── color/
│ │ │ │ │ │ └── btn_enable_color.xml
│ │ │ │ │ ├── drawable/
│ │ │ │ │ │ ├── bg_ai_message.xml
│ │ │ │ │ │ ├── bg_audio_background.xml
│ │ │ │ │ │ ├── bg_circle_gray.xml
│ │ │ │ │ │ ├── bg_citations_bottom.xml
│ │ │ │ │ │ ├── bg_index_bottom.xml
│ │ │ │ │ │ ├── bg_input_box_background.xml
│ │ │ │ │ │ ├── bg_round_gray.xml
│ │ │ │ │ │ ├── bg_spinner_dropdown.xml
│ │ │ │ │ │ ├── bg_topk_bottom.xml
│ │ │ │ │ │ ├── bg_user_message.xml
│ │ │ │ │ │ ├── btn_bg_enable.xml
│ │ │ │ │ │ ├── btn_rounded_black_bg.xml
│ │ │ │ │ │ ├── btn_rounded_black_bg_18.xml
│ │ │ │ │ │ ├── btn_rounded_border.xml
│ │ │ │ │ │ ├── btn_rounded_border_18.xml
│ │ │ │ │ │ ├── btn_rounded_border_gray.xml
│ │ │ │ │ │ ├── btn_rounded_border_gray_8dp.xml
│ │ │ │ │ │ ├── btn_rounded_border_transparent.xml
│ │ │ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ │ │ ├── ic_launcher_foreground.xml
│ │ │ │ │ │ ├── icon_add.xml
│ │ │ │ │ │ ├── icon_alert_yellow.xml
│ │ │ │ │ │ ├── icon_arrow_down.xml
│ │ │ │ │ │ ├── icon_arrow_down_white.xml
│ │ │ │ │ │ ├── icon_arrow_right.xml
│ │ │ │ │ │ ├── icon_back.xml
│ │ │ │ │ │ ├── icon_check.xml
│ │ │ │ │ │ ├── icon_clear.xml
│ │ │ │ │ │ ├── icon_close.xml
│ │ │ │ │ │ ├── icon_config.xml
│ │ │ │ │ │ ├── icon_database.xml
│ │ │ │ │ │ ├── icon_file.xml
│ │ │ │ │ │ ├── icon_tag_cpu.xml
│ │ │ │ │ │ ├── icon_tag_gpu.xml
│ │ │ │ │ │ ├── icon_tag_npu.xml
│ │ │ │ │ │ ├── icon_text.xml
│ │ │ │ │ │ ├── icon_topk_config.xml
│ │ │ │ │ │ ├── img_config.xml
│ │ │ │ │ │ ├── img_config_false.xml
│ │ │ │ │ │ ├── img_config_true.xml
│ │ │ │ │ │ ├── rb_bg.xml
│ │ │ │ │ │ ├── rb_bg_false.xml
│ │ │ │ │ │ ├── rb_bg_true.xml
│ │ │ │ │ │ └── thumb_topk.xml
│ │ │ │ │ ├── layout/
│ │ │ │ │ │ ├── activity_file_content.xml
│ │ │ │ │ │ ├── activity_folder.xml
│ │ │ │ │ │ ├── activity_main.xml
│ │ │ │ │ │ ├── dialog_config.xml
│ │ │ │ │ │ ├── dialog_select_plugin_id.xml
│ │ │ │ │ │ ├── dialog_topk_config.xml
│ │ │ │ │ │ ├── fragment_index.xml
│ │ │ │ │ │ ├── fragment_indexed_images.xml
│ │ │ │ │ │ ├── fragment_indexed_videos.xml
│ │ │ │ │ │ ├── item_ai_message.xml
│ │ │ │ │ │ ├── item_audio_scroll.xml
│ │ │ │ │ │ ├── item_citation.xml
│ │ │ │ │ │ ├── item_image_item_message.xml
│ │ │ │ │ │ ├── item_image_message.xml
│ │ │ │ │ │ ├── item_image_scroll.xml
│ │ │ │ │ │ ├── item_model.xml
│ │ │ │ │ │ ├── item_profile_message.xml
│ │ │ │ │ │ ├── item_select_file.xml
│ │ │ │ │ │ ├── item_select_image.xml
│ │ │ │ │ │ ├── item_spinner_dropdown.xml
│ │ │ │ │ │ ├── item_user_message.xml
│ │ │ │ │ │ ├── menu_layout.xml
│ │ │ │ │ │ └── spinner_custom.xml
│ │ │ │ │ ├── mipmap-anydpi-v26/
│ │ │ │ │ │ ├── ic_launcher.xml
│ │ │ │ │ │ └── ic_launcher_round.xml
│ │ │ │ │ ├── values/
│ │ │ │ │ │ ├── attrs.xml
│ │ │ │ │ │ ├── colors.xml
│ │ │ │ │ │ ├── ids.xml
│ │ │ │ │ │ ├── strings.xml
│ │ │ │ │ │ ├── styles.xml
│ │ │ │ │ │ └── themes.xml
│ │ │ │ │ └── xml/
│ │ │ │ │ ├── backup_rules.xml
│ │ │ │ │ ├── data_extraction_rules.xml
│ │ │ │ │ └── file_paths.xml
│ │ │ │ └── test/
│ │ │ │ └── java/
│ │ │ │ └── com/
│ │ │ │ └── nexa/
│ │ │ │ └── demo/
│ │ │ │ └── ExampleUnitTest.kt
│ │ │ └── test
│ │ ├── build.gradle.kts
│ │ ├── gradle/
│ │ │ ├── libs.versions.toml
│ │ │ └── wrapper/
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ │ ├── gradle.properties
│ │ ├── gradlew
│ │ ├── gradlew.bat
│ │ ├── settings.gradle.kts
│ │ └── transform/
│ │ ├── .gitignore
│ │ ├── build.gradle.kts
│ │ ├── consumer-rules.pro
│ │ ├── proguard-rules.pro
│ │ └── src/
│ │ ├── androidTest/
│ │ │ └── java/
│ │ │ └── ai/
│ │ │ └── nexa/
│ │ │ └── transform/
│ │ │ └── ExampleInstrumentedTest.kt
│ │ ├── main/
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java/
│ │ │ └── ai/
│ │ │ └── nexa/
│ │ │ └── transform/
│ │ │ ├── DownloadUtils.kt
│ │ │ ├── ImageUtils.kt
│ │ │ └── VlmContentTransfer.kt
│ │ └── test/
│ │ └── java/
│ │ └── ai/
│ │ └── nexa/
│ │ └── transform/
│ │ └── ExampleUnitTest.kt
│ ├── clawd/
│ │ ├── README.md
│ │ └── clawdbot.example.json
│ ├── crewai/
│ │ ├── README.md
│ │ ├── example.py
│ │ └── requirements.txt
│ ├── docker/
│ │ └── RAG-VLM/
│ │ ├── Dockerfile
│ │ ├── README.md
│ │ ├── gradio_ui.py
│ │ ├── requirements.txt
│ │ └── start.sh
│ ├── edsl/
│ │ ├── README.md
│ │ ├── example.py
│ │ └── requirements.txt
│ ├── langchain/
│ │ ├── README.md
│ │ ├── example.py
│ │ └── requirements.txt
│ └── llama-index/
│ ├── README.md
│ ├── config.py
│ ├── example.py
│ └── requirements.txt
├── docs/
│ ├── README.md
│ ├── integrate-ag2.md
│ ├── integrate-crewai.md
│ ├── integrate-langchain.md
│ ├── integrate-llamaindex.md
│ └── integrate-openwebui.md
├── pyproject.toml
├── runner/
│ ├── .gitignore
│ ├── Makefile
│ ├── README.md
│ ├── README_zh.md
│ ├── cmd/
│ │ ├── nexa-cli/
│ │ │ ├── common/
│ │ │ │ ├── log.go
│ │ │ │ ├── process.go
│ │ │ │ ├── repl.go
│ │ │ │ ├── util_darwin.go
│ │ │ │ ├── util_linux.go
│ │ │ │ └── util_windows.go
│ │ │ ├── config.go
│ │ │ ├── function_call.go
│ │ │ ├── infer.go
│ │ │ ├── logic/
│ │ │ │ └── cv.go
│ │ │ ├── main.go
│ │ │ ├── model.go
│ │ │ ├── model_test.go
│ │ │ ├── run.go
│ │ │ ├── serve.go
│ │ │ ├── update.go
│ │ │ ├── version.go
│ │ │ └── version_test.go
│ │ └── nexa-launcher/
│ │ └── main.go
│ ├── go.mod
│ ├── go.sum
│ ├── internal/
│ │ ├── config/
│ │ │ ├── config.go
│ │ │ ├── config_test.go
│ │ │ ├── model_mapping.go
│ │ │ └── model_mapping_test.go
│ │ ├── downloader/
│ │ │ └── http.go
│ │ ├── model_hub/
│ │ │ ├── model_hub.go
│ │ │ ├── model_hub_hf.go
│ │ │ ├── model_hub_localfs.go
│ │ │ ├── model_hub_modelscope.go
│ │ │ ├── model_hub_s3.go
│ │ │ ├── model_hub_test.go
│ │ │ └── model_hub_volces.go
│ │ ├── readline/
│ │ │ ├── action.go
│ │ │ ├── buffer.go
│ │ │ ├── history.go
│ │ │ ├── readline.go
│ │ │ ├── terminal.go
│ │ │ ├── terminal_darwin.go
│ │ │ ├── terminal_linux.go
│ │ │ └── terminal_windows.go
│ │ ├── record/
│ │ │ ├── record.go
│ │ │ └── stream_record.go
│ │ ├── render/
│ │ │ ├── progressbar.go
│ │ │ ├── spinner.go
│ │ │ ├── theme.go
│ │ │ └── theme_test.go
│ │ ├── store/
│ │ │ ├── config.go
│ │ │ ├── errors.go
│ │ │ ├── lock.go
│ │ │ ├── manager.go
│ │ │ └── model.go
│ │ └── types/
│ │ ├── model.go
│ │ └── utils.go
│ ├── nexa-sdk/
│ │ ├── .gitignore
│ │ ├── asr.go
│ │ ├── common.go
│ │ ├── cv.go
│ │ ├── diarize.go
│ │ ├── embedder.go
│ │ ├── image_gen.go
│ │ ├── llm.go
│ │ ├── ml.go
│ │ ├── reranker.go
│ │ ├── tts.go
│ │ └── vlm.go
│ ├── release/
│ │ ├── darwin/
│ │ │ ├── Info.plist
│ │ │ ├── entitlements.plist
│ │ │ ├── nexa-icon.icns
│ │ │ └── scripts/
│ │ │ ├── notarize.sh
│ │ │ ├── postinstall
│ │ │ ├── preinstall
│ │ │ ├── prepackage.sh
│ │ │ ├── sign.sh
│ │ │ └── uninstall.sh
│ │ ├── linux/
│ │ │ ├── Dockerfile
│ │ │ ├── install.sh
│ │ │ └── package.sh
│ │ └── windows/
│ │ ├── nexa_installer.iss
│ │ └── nexa_launcher.py
│ ├── server/
│ │ ├── docs/
│ │ │ ├── swagger.go
│ │ │ ├── swagger.yaml
│ │ │ └── ui/
│ │ │ ├── index.css
│ │ │ ├── index.html
│ │ │ ├── oauth2-redirect.html
│ │ │ ├── swagger-initializer.js
│ │ │ ├── swagger-ui-bundle.js
│ │ │ ├── swagger-ui-es-bundle-core.js
│ │ │ ├── swagger-ui-es-bundle.js
│ │ │ ├── swagger-ui-standalone-preset.js
│ │ │ ├── swagger-ui.css
│ │ │ └── swagger-ui.js
│ │ ├── handler/
│ │ │ ├── audio.go
│ │ │ ├── audio_test.go
│ │ │ ├── chat.go
│ │ │ ├── cv.go
│ │ │ ├── embeddings.go
│ │ │ ├── images.go
│ │ │ ├── model.go
│ │ │ └── reranking.go
│ │ ├── middleware/
│ │ │ ├── auth.go
│ │ │ ├── cors.go
│ │ │ └── gil.go
│ │ ├── route.go
│ │ ├── server.go
│ │ ├── service/
│ │ │ ├── keepalive.go
│ │ │ └── service.go
│ │ └── utils/
│ │ ├── common.go
│ │ └── common_test.go
│ └── tests/
│ ├── .gitattributes
│ ├── cases/
│ │ ├── __init__.py
│ │ ├── asr.py
│ │ ├── audio_multi_round.py
│ │ ├── base.py
│ │ ├── cv.py
│ │ ├── image_multi_round.py
│ │ ├── multi_round.py
│ │ ├── reranker.py
│ │ └── single_round.py
│ ├── run.py
│ └── scripts/
│ ├── __init__.py
│ ├── config.py
│ ├── log.py
│ └── utils.py
└── solutions/
├── README.md
└── embedneural/
├── README.md
├── gradio_ui.py
├── nexa_client.py
├── requirements.txt
├── search.py
├── style.py
└── viewmodel.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.yml
================================================
name: "Bug report"
description: "Something isn't working right with NexaSDK"
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for reporting a bug in NexaSDK 🙏
Before filing:
- Search existing issues to see if this has already been reported.
- Try the latest release, if possible.
- type: checkboxes
id: checks
attributes:
label: "Pre-checks"
options:
- label: "I searched existing issues"
required: true
- label: "I’m using the latest NexaSDK release"
required: false
- type: textarea
id: what-happened
attributes:
label: "What happened?"
description: "Describe the bug and what you expected to happen."
placeholder: |
When I do sth with model X on backend Y, it does Z.
I expected it to ...
render: text
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: "Steps to reproduce"
description: "Minimal steps or code to trigger the issue."
placeholder: |
1. Install NexaSDK using ...
2. Run: ...
3. See error: ...
render: markdown
validations:
required: true
- type: textarea
id: logs
attributes:
label: "Logs & stack traces"
description: "Paste any relevant logs or error messages."
placeholder: |
```text
<logs here>
```
render: text
- type: textarea
id: models
attributes:
label: "Model(s) and quantization"
description: "Which model(s) and quantization are you using?"
placeholder: |
e.g. Ministral-3-3B-Instruct-2512 Q4_K_M, AutoNeural-SA8295P int4, Qwen2.5 fp16
render: text
- type: input
id: nexasdk-version
attributes:
label: "NexaSDK version"
description: 'Output of `nexa version` or `python -c "import nexa; print(nexa.__version__)"` or similar.'
placeholder: |
e.g.
NexaSDK Bridge Version: v1.0.31
NexaSDK CLI Version: v0.2.60
validations:
required: true
- type: input
id: install-method
attributes:
label: "Install method"
description: "How did you install NexaSDK?"
placeholder: "pip, conda, docker, from source, other"
validations:
required: true
- type: input
id: os
attributes:
label: "OS and version"
placeholder: "e.g. Windows 11, Ubuntu 22.04, macOS 15"
validations:
required: true
- type: input
id: hardware
attributes:
label: "Hardware / accelerator"
description: "CPU/GPU/NPU and device details."
placeholder: "e.g. RTX 4090, Snapdragon X Elite NPU, SA8295P, M4 Max"
- type: textarea
id: extra
attributes:
label: "Additional context"
description: "Anything else that might help (configs, screenshots, links)."
render: markdown
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.yml
================================================
name: "Feature request"
description: "Request a new feature or improvement for NexaSDK"
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for helping improve NexaSDK 🙌
Use this template for concrete improvements to the SDK.
- type: checkboxes
id: checks
attributes:
label: "Pre-checks"
options:
- label: "I searched existing issues and discussions"
required: true
- type: textarea
id: problem
attributes:
label: "What problem are you trying to solve?"
description: "Describe your use case and what’s painful today."
placeholder: |
I’m building X (e.g. local copilot on Snapdragon PC) and I’m blocked by Y in NexaSDK.
render: text
validations:
required: true
- type: textarea
id: solution
attributes:
label: "What would you like NexaSDK to do?"
description: "Describe your ideal solution (APIs, CLI flags, configs, etc.)."
placeholder: |
Example:
- Add a `nexa run --backend npu` option that ...
- Provide a Python helper `nexa.auto_backend(...)` that ...
render: markdown
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: "Alternatives you've considered"
description: "Workarounds or other tools you’ve tried."
placeholder: |
I can currently do this by ..., but it’s slow / complex / fragile.
render: text
- type: textarea
id: impact
attributes:
label: "Who does this help, and how much?"
description: "Rough sense of impact (devx, perf, device coverage, etc.)."
placeholder: |
This would be useful for all Windows NPU developers using NexaSDK because ...
render: text
- type: textarea
id: extra
attributes:
label: "Additional context"
description: "Links, mock APIs, diagrams, prior art, etc."
render: markdown
================================================
FILE: .github/ISSUE_TEMPLATE/model_request.yml
================================================
name: "Model request"
description: "Request support for a new model or variant in NexaSDK"
labels: ["model-request"]
body:
- type: markdown
attributes:
value: |
Request support for a new model to be added to NexaSDK.
Please include as much detail as you can so we can prioritize properly.
- type: checkboxes
id: checks
attributes:
label: "Pre-checks"
options:
- label: "I searched existing issues and discussions for this model"
required: true
- type: input
id: model-name
attributes:
label: "Model name"
description: "Name of the model you’d like supported."
placeholder: "e.g. Ministral-8x7B, Qwen3-VL-32B, etc."
validations:
required: true
- type: input
id: model-source
attributes:
label: "Model source / link"
description: "Link to the model (Hugging Face, GitHub, vendor page, etc.)."
placeholder: "https://huggingface.co/..."
validations:
required: true
- type: textarea
id: use-cases
attributes:
label: "Primary use cases"
description: "What are you planning to build with this model?"
placeholder: |
e.g. On-device coding assistant, in-car multimodal assistant, document RAG, etc.
render: text
validations:
required: true
- type: textarea
id: hardware
attributes:
label: "Target hardware / backend"
description: "Where do you want this model to run?"
placeholder: |
e.g. Snapdragon X Elite NPU, SA8295P, RTX 4080, Apple M4, CPU-only, etc.
render: text
validations:
required: true
- type: textarea
id: extra
attributes:
label: "Additional context"
description: "Benchmarks, papers, licensing notes, or anything else that helps us evaluate."
render: markdown
================================================
FILE: .github/workflows/build-linux.yml
================================================
name: NexaCLI on Linux
on:
push:
tags:
- "v*"
jobs:
build-cli:
name: Build ${{ matrix.runner }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-22.04
arch: x86_64
- runner: ubuntu-22.04-arm
arch: arm64
env:
VERSION: ${{ github.ref_name }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.25.4
cache-dependency-path: runner/go.sum
- name: Download runtime
run: |
cd runner
make download
- name: Build Nexa Cli
run: |
cd runner
make build
rm build/ml.h
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: "nexa-cli_linux_${{ matrix.arch }}"
path: runner/build
include-hidden-files: true
package-release:
name: Package Release ${{ matrix.runner }}
needs: build-cli
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-22.04
arch: x86_64
- runner: ubuntu-22.04-arm
arch: arm64
env:
VERSION: ${{ github.ref_name }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: "nexa-cli_linux_${{ matrix.arch }}"
path: artifacts
- name: Create Self-Contained Installer Script
id: package
run: |
chmod +x runner/release/linux/package.sh
./runner/release/linux/package.sh artifacts \
runner/release/linux/install.sh \
nexa-cli_linux_${{ matrix.arch }}.sh
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
repository: NexaAI/nexa-sdk
tag_name: ${{ env.VERSION }}
files: |
nexa-cli_linux_${{ matrix.arch }}.sh
draft: ${{ contains(github.ref, '-rc') }}
generate_release_notes: ${{ matrix.arch == 'x86_64' }}
make_latest: ${{ !contains(github.ref, '-rc') }}
env:
GITHUB_TOKEN: ${{ secrets.ZACK_ACCESS_TOKEN }}
- name: Configure AWS credentials
if: ${{ !contains(github.ref, '-rc') }}
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
- name: Sync to S3
if: ${{ !contains(github.ref, '-rc') }}
shell: bash
run: |
aws s3 cp "nexa-cli_linux_${{ matrix.arch }}.sh" "s3://nexa-model-hub-bucket/public/nexa_sdk/downloads/nexa-cli_linux_${{ matrix.arch }}.sh"
docker-release:
name: Docker Release
needs: build-cli
runs-on: ubuntu-22.04
env:
VERSION: ${{ github.ref_name }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Prepare Build Context
run: |
mkdir -p runner/release/linux
mv artifacts/nexa-cli_linux_x86_64 runner/release/linux/nexa_sdk.amd64
mv artifacts/nexa-cli_linux_arm64 runner/release/linux/nexa_sdk.arm64
chmod +x runner/release/linux/*/nexa
chmod +x runner/release/linux/*/nexa-cli
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and Push Docker Image (Base)
uses: docker/build-push-action@v6
with:
context: runner/release/linux
push: true
platforms: linux/amd64,linux/arm64
tags: |
nexa4ai/nexasdk${{ contains(github.ref, '-rc') && '-test' || '' }}:${{ env.VERSION }}
${{ !contains(github.ref, '-rc') && 'nexa4ai/nexasdk:latest' || '' }}
- name: Build and Push Docker Image (Cuda)
uses: docker/build-push-action@v6
with:
context: runner/release/linux
push: true
platforms: linux/amd64
build-args: |
BASE_IMAGE=nvidia/cuda:12.9.1-runtime-ubuntu22.04
tags: |
nexa4ai/nexasdk${{ contains(github.ref, '-rc') && '-test' || '' }}:${{ env.VERSION }}-cuda
${{ !contains(github.ref, '-rc') && 'nexa4ai/nexasdk:latest-cuda' || '' }}
================================================
FILE: .github/workflows/build-macos.yml
================================================
name: NexaCLI on MacOS
on:
push:
tags:
- "v*"
jobs:
build-cli:
name: macos_${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: macos-15-intel
arch: x86_64
- runner: macos-15
arch: arm64
env:
VERSION: ${{ github.ref_name }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.25.4
cache-dependency-path: runner/go.sum
- name: Download runtime
run: |
cd runner
make download
- name: Build Nexa Cli
run: |
cd runner
make build
rm build/ml.h
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: nexa-cli_macos_${{ matrix.arch }}
path: runner/build
include-hidden-files: true
package-and-release:
name: Package for macos_${{ matrix.arch }}
needs: build-cli
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: macos-15-intel
arch: x86_64
- runner: macos-15
arch: arm64
env:
VERSION: ${{ github.ref_name }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: nexa-cli_macos_${{ matrix.arch }}
path: artifacts
- name: Prepare file structure for packaging
id: prep_files
run: |
chmod +x runner/release/darwin/scripts/prepackage.sh
bash runner/release/darwin/scripts/prepackage.sh "${{ env.VERSION }}"
- name: Fix dylib Linkages (RPATH)
run: |
RESOURCES_PATH="${{ env.APP_PATH }}/Contents/Resources"
install_name_tool -add_rpath "@loader_path" "${RESOURCES_PATH}/nexa-cli"
- name: Import Code Signing Certificates
env:
APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_CERTIFICATE_BASE64 }}
APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
INSTALLER_CERTIFICATE_BASE64: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_BASE64 }}
INSTALLER_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
run: |
echo $APP_CERTIFICATE_BASE64 | base64 --decode > app_certificate.p12
echo $INSTALLER_CERTIFICATE_BASE64 | base64 --decode > installer_certificate.p12
security create-keychain -p "" build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p "" build.keychain
security import app_certificate.p12 -k build.keychain -P $APP_CERTIFICATE_PASSWORD -T /usr/bin/codesign
security import installer_certificate.p12 -k build.keychain -P $INSTALLER_CERTIFICATE_PASSWORD -T /usr/bin/productsign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "" build.keychain
- name: Sign binaries and libraries
run: |
chmod +x runner/release/darwin/scripts/sign.sh
bash runner/release/darwin/scripts/sign.sh "${{ env.APP_PATH }}" "${{ secrets.APPLE_ID_APPLICATION }}"
- name: Build PKG
run: |
pkgbuild --root "${{ steps.prep_files.outputs.STAGING_DIR }}" \
--scripts "${{ steps.prep_files.outputs.SCRIPTS_DIR }}" \
--identifier "com.nexaai.nexa-sdk" \
--version "${{ env.VERSION }}" \
--install-location / \
"artifacts/nexa-cli_macos_${{ matrix.arch }}-unsigned.pkg"
- name: Productsign PKG
run: |
productsign --sign "${{ secrets.APPLE_ID_INSTALLER }}" --timestamp "artifacts/nexa-cli_macos_${{ matrix.arch }}-unsigned.pkg" "artifacts/nexa-cli_macos_${{ matrix.arch }}.pkg"
pkgutil --check-signature "artifacts/nexa-cli_macos_${{ matrix.arch }}.pkg"
rm "artifacts/nexa-cli_macos_${{ matrix.arch }}-unsigned.pkg"
- name: Notarize & Staple PKG
run: |
chmod +x runner/release/darwin/scripts/notarize.sh
bash runner/release/darwin/scripts/notarize.sh \
"artifacts/nexa-cli_macos_${{ matrix.arch }}.pkg" \
"${{ secrets.APPLE_ID }}" \
"${{ secrets.APPLE_ID_PASSWORD }}" \
"${{ secrets.APPLE_TEAM_ID }}"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
repository: NexaAI/nexa-sdk
tag_name: ${{ env.VERSION }}
files: |
artifacts/nexa-cli_macos_${{ matrix.arch }}.pkg
draft: ${{ contains(github.ref, '-rc') }}
generate_release_notes: false
make_latest: ${{ !contains(github.ref, '-rc') }}
env:
GITHUB_TOKEN: ${{ secrets.ZACK_ACCESS_TOKEN }}
- name: Configure AWS credentials
if: ${{ !contains(github.ref, '-rc') }}
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
- name: Sync to S3
if: ${{ !contains(github.ref, '-rc') }}
shell: bash
run: |
aws s3 cp "artifacts/nexa-cli_macos_${{ matrix.arch }}.pkg" "s3://nexa-model-hub-bucket/public/nexa_sdk/downloads/nexa-cli_macos_${{ matrix.arch }}.pkg"
================================================
FILE: .github/workflows/build-windows.yml
================================================
name: NexaCLI on Windows
on:
push:
tags:
- "v*"
jobs:
build-cli:
name: windows_${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: sdk-windows-8-core-2
arch: x86_64
- runner: windows-11-arm
arch: arm64
env:
VERSION: ${{ github.ref_name }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.25.4
cache-dependency-path: runner/go.sum
- name: Setup MSYS2 (ARM64)
if: matrix.arch == 'arm64'
uses: msys2/setup-msys2@v2
with:
msystem: CLANGARM64
location: C:/Tools
update: true
install: mingw-w64-clang-aarch64-clang
- name: Setup Compile Environment (ARM64)
if: matrix.arch == 'arm64'
shell: bash
run: |
echo "CC=C:/Tools/msys64/clangarm64/bin/clang.exe" >> $GITHUB_ENV
echo "CXX=C:/Tools/msys64/clangarm64/bin/clang++.exe" >> $GITHUB_ENV
- name: Download runtime
shell: bash
run: |
cd runner
make download ARCH=${{ matrix.arch }}
ls build
- name: Build Nexa Cli
shell: bash
run: |
cd runner
make build ARCH=${{ matrix.arch }}
rm -f build/ml.h
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: nexa-cli_windows_${{ matrix.arch }}
path: runner/build
include-hidden-files: true
build-installer:
name: Build Windows Installer & Release
needs: build-cli
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: sdk-windows-8-core-2
arch: x86_64
- runner: windows-11-arm
arch: arm64
env:
VERSION: ${{ github.ref_name }}
ARCH: ${{ matrix.arch }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: nexa-cli_windows_${{ matrix.arch }}
path: artifacts
- name: Build launcher with PyInstaller
run: |
pip install pyinstaller
pyinstaller --onefile --noconsole --distpath artifacts --name "nexa-cli-launcher" --icon="runner/release/windows/nexa_logo.ico" runner/release/windows/nexa_launcher.py
# === Install Inno Setup (before compiling installers) ===
- name: Install Inno Setup
shell: pwsh
run: |
if (Get-Command ISCC.exe -ErrorAction SilentlyContinue) { return }
if (Get-Command choco -ErrorAction SilentlyContinue) {
choco install innosetup -y --no-progress
} else {
winget install --id JRSoftware.InnoSetup -e --accept-source-agreements --accept-package-agreements
}
$inno = "${env:ProgramFiles(x86)}\Inno Setup 6"
if (Test-Path "$inno\ISCC.exe") {
"$inno" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
}
- name: Sign executables with AzureSignTool
shell: pwsh
run: |
dotnet tool install --global AzureSignTool
Get-ChildItem -Path "artifacts" -Recurse -Include *.exe, *.dll | ForEach-Object {
azuresigntool sign `
-kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" `
-kvc "${{ secrets.AZURE_CERT_NAME }}" `
-kvi "${{ secrets.AZURE_CLIENT_ID }}" `
-kvs "${{ secrets.AZURE_CLIENT_SECRET }}" `
--azure-key-vault-tenant-id "${{ secrets.AZURE_TENANT_ID }}" `
-tr http://timestamp.globalsign.com/tsa/advanced `
-td sha256 `
$_.FullName
}
- name: Prepare Installer Files (X86_64)
if: matrix.arch == 'x86_64'
shell: bash
run: |
cp -r artifacts artifacts_cuda
rm -r artifacts_cuda/nexaai*
rm -r artifacts/nexa_cuda*
- name: Compile Installer (CUDA) (X86_64)
if: matrix.arch == 'x86_64'
uses: Minionguyjpro/Inno-Setup-Action@v1.2.6
with:
path: runner/release/windows/nexa_installer.iss
options: /O+
env:
ORT: "_cuda"
- name: Compile Installer
uses: Minionguyjpro/Inno-Setup-Action@v1.2.6
with:
path: runner/release/windows/nexa_installer.iss
options: /O+
env:
ORT: ""
- name: Sign Installer (ARM64)
if: matrix.arch == 'arm64'
shell: pwsh
run: |
azuresigntool sign `
-kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" `
-kvc "${{ secrets.AZURE_CERT_NAME }}" `
-kvi "${{ secrets.AZURE_CLIENT_ID }}" `
-kvs "${{ secrets.AZURE_CLIENT_SECRET }}" `
--azure-key-vault-tenant-id "${{ secrets.AZURE_TENANT_ID }}" `
-tr http://timestamp.globalsign.com/tsa/advanced `
-td sha256 `
"nexa-cli_windows_${{ matrix.arch }}.exe"
- name: Sign Installer (X86_64)
if: matrix.arch == 'x86_64'
run: |
azuresigntool sign `
-kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" `
-kvc "${{ secrets.AZURE_CERT_NAME }}" `
-kvi "${{ secrets.AZURE_CLIENT_ID }}" `
-kvs "${{ secrets.AZURE_CLIENT_SECRET }}" `
--azure-key-vault-tenant-id "${{ secrets.AZURE_TENANT_ID }}" `
-tr http://timestamp.globalsign.com/tsa/advanced `
-td sha256 `
"nexa-cli_windows_${{ matrix.arch }}_cuda.exe"
azuresigntool sign `
-kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" `
-kvc "${{ secrets.AZURE_CERT_NAME }}" `
-kvi "${{ secrets.AZURE_CLIENT_ID }}" `
-kvs "${{ secrets.AZURE_CLIENT_SECRET }}" `
--azure-key-vault-tenant-id "${{ secrets.AZURE_TENANT_ID }}" `
-tr http://timestamp.globalsign.com/tsa/advanced `
-td sha256 `
"nexa-cli_windows_${{ matrix.arch }}.exe"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
repository: NexaAI/nexa-sdk
tag_name: ${{ env.VERSION }}
files: |
nexa-cli_windows_${{ matrix.arch }}_cuda.exe
nexa-cli_windows_${{ matrix.arch }}.exe
draft: ${{ contains(github.ref, '-rc') }}
generate_release_notes: false
make_latest: ${{ !contains(github.ref, '-rc') }}
env:
GITHUB_TOKEN: ${{ secrets.ZACK_ACCESS_TOKEN }}
- name: Configure AWS credentials
if: ${{ !contains(github.ref, '-rc') }}
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
- name: Sync to S3
if: ${{ !contains(github.ref, '-rc') }}
shell: bash
run: |
aws s3 cp "nexa-cli_windows_${{ matrix.arch }}.exe" "s3://nexa-model-hub-bucket/public/nexa_sdk/downloads/nexa-cli_windows_${{ matrix.arch }}.exe"
- name: Sync to S3 (CUDA) (X86_64)
if: ${{ !contains(github.ref, '-rc') && matrix.arch == 'x86_64' }}
shell: bash
run: |
aws s3 cp "nexa-cli_windows_${{ matrix.arch }}_cuda.exe" "s3://nexa-model-hub-bucket/public/nexa_sdk/downloads/nexa-cli_windows_${{ matrix.arch }}_cuda.exe"
================================================
FILE: .github/workflows/lint.yml
================================================
name: Lint
on:
pull_request:
branches: [main]
paths:
- 'runner/**'
- '.github/workflows/lint.yml'
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.25'
cache-dependency-path: runner/go.sum
- name: go fmt
working-directory: runner
run: |
unformatted=$(gofmt -s -l .)
[ -z "$unformatted" ] || (echo "Unformatted: $unformatted"; exit 1)
- name: Download runtime
working-directory: runner
run: make download
- name: go vet
working-directory: runner
run: go vet ./...
================================================
FILE: .github/workflows/test.yml
================================================
name: Test
on:
# pull_request:
# branches: [main, main-test]
workflow_dispatch:
jobs:
test-llm:
name: ${{ matrix.os }} / ${{ matrix.backend }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-15]
backend: [llama-cpp-metal]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.24.3
cache-dependency-path: runner/go.sum
- name: Download backend runtime
run: make download BRIDGE_BACKEND=${{ matrix.backend }}
- name: Cache Nexa model files
uses: actions/cache@v4
with:
path: ~/.cache/models/Qwen3-0.6B-Q8_0.gguf
key: Qwen3-0.6B-Q8_0.gguf
restore-keys: |
Qwen3-0.6B-Q8_0.gguf
- name: Download model
shell: bash
run: |
MODEL_PATH="$HOME/.cache/models/Qwen3-0.6B-Q8_0.gguf"
if [ ! -f "$MODEL_PATH" ]; then
mkdir -p "$(dirname "$MODEL_PATH")"
wget -nv -O "$MODEL_PATH" https://huggingface.co/nexaml/Qwen3-0.6B/resolve/main/Qwen3-0.6B-Q8_0.gguf
else
echo "Model already cached, skip download."
fi
- name: Test LLM Multi-Turn Chat
shell: bash
run: |
if [[ "$RUNNER_OS" == "macOS" ]]; then
export DYLD_LIBRARY_PATH="$PWD/build/lib/${{ matrix.backend }}"
elif [[ "$RUNNER_OS" == "Linux" ]]; then
export LD_LIBRARY_PATH="$PWD/build/lib/${{ matrix.backend }}"
elif [[ "$RUNNER_OS" == "Windows" ]]; then
export PATH="$PWD/build/lib/${{ matrix.backend }};$PATH"
fi
export CGO_LDFLAGS="-L$PWD/build/lib/${{ matrix.backend }}"
cd runner/nexa-sdk && go test -v -run "Test.*LLM|TestChatMultiTurn"
================================================
FILE: .gitignore
================================================
.DS_Store
.vscode/
tempnexaai-env/
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2024-2026 Nexa AI, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: NOTICE
================================================
# Third-Party Licenses
This document provides information about third-party libraries used in the NexaSDK project and their respective licenses. All libraries listed below are licensed under permissive open-source licenses (MIT, Apache 2.0, BSD, or equivalent) that are compatible with NexaSDK's Apache 2.0 license.
---
## Go Dependencies
### gin-gonic/gin
- **License**: MIT License
- **URL**: https://github.com/gin-gonic/gin
- **Description**: HTTP web framework written in Go
### spf13/cobra
- **License**: Apache License 2.0
- **URL**: https://github.com/spf13/cobra
- **Description**: Commander for modern Go CLI applications
### spf13/viper
- **License**: MIT License
- **URL**: https://github.com/spf13/viper
- **Description**: Go configuration with fangs
### AWS SDK for Go v2
- **License**: Apache License 2.0
- **URL**: https://github.com/aws/aws-sdk-go-v2
- **Description**: AWS SDK for the Go programming language
- **Packages**: aws-sdk-go-v2, aws-sdk-go-v2/config, aws-sdk-go-v2/service/s3
### bytedance/sonic
- **License**: Apache License 2.0
- **URL**: https://github.com/bytedance/sonic
- **Description**: Blazingly fast JSON serializing & deserializing library
### charmbracelet/huh
- **License**: MIT License
- **URL**: https://github.com/charmbracelet/huh
- **Description**: Build terminal forms and prompts
### charmbracelet/lipgloss
- **License**: MIT License
- **URL**: https://github.com/charmbracelet/lipgloss
- **Description**: Style definitions for nice terminal layouts
### charmbracelet/bubbletea
- **License**: MIT License
- **URL**: https://github.com/charmbracelet/bubbletea
- **Description**: Powerful little TUI framework
### dustin/go-humanize
- **License**: MIT License
- **URL**: https://github.com/dustin/go-humanize
- **Description**: Formatters for units to human friendly sizes
### gofrs/flock
- **License**: BSD 3-Clause License
- **URL**: https://github.com/gofrs/flock
- **Description**: Thread-safe file locking library
### chzyer/readline
- **License**: MIT License
- **URL**: https://github.com/chzyer/readline
- **Description**: Pure Go readline library with support for command line editing and history
### openai/openai-go
- **License**: Apache License 2.0
- **URL**: https://github.com/openai/openai-go
- **Description**: OpenAI Go API library
### schollz/progressbar
- **License**: MIT License
- **URL**: https://github.com/schollz/progressbar
- **Description**: Simple command line progress bar
### valyala/fasthttp
- **License**: MIT License
- **URL**: https://github.com/valyala/fasthttp
- **Description**: Fast HTTP implementation for Go
---
## C/C++ Dependencies
### ggml
- **License**: MIT License
- **Copyright**: Copyright (c) 2023-2024 The ggml authors
- **URL**: https://github.com/ggml-org/ggml
- **Description**: Tensor library for machine learning
- **License File**: https://github.com/ggml-org/ggml/blob/master/LICENSE
### pybind11
- **License**: BSD 3-Clause License
- **Copyright**: Copyright (c) 2016 Wenzel Jakob
- **URL**: https://github.com/pybind/pybind11
- **Description**: Seamless operability between C++11 and Python
- **License File**: [nexasdk-bridge/third-party/pybind11/LICENSE](https://github.com/pybind/pybind11/blob/master/LICENSE)
### mlx-audio
- **License**: MIT License
- **Copyright**: Copyright (c) 2024 Prince Canuma
- **URL**: https://github.com/Blaizzy/mlx-audio
- **Description**: Audio processing with MLX
- **License File**: [nexasdk-bridge/third-party/mlx-audio/LICENSE](https://github.com/Blaizzy/mlx-audio/blob/main/LICENSE)
### mlx-vlm
- **License**: MIT License
- **Copyright**: Copyright © 2023 Apple Inc.
- **URL**: https://github.com/Blaizzy/mlx-vlm
- **Description**: Vision-language models with MLX
- **License File**: [nexasdk-bridge/third-party/mlx-vlm/LICENSE](https://github.com/Blaizzy/mlx-vlm/blob/main/LICENSE)
### xtensor
- **License**: BSD 3-Clause License
- **Copyright**: Copyright (c) 2016 Johan Mabille, Sylvain Corlay and Wolf Vollprecht, Copyright (c) 2016 QuantStack
- **URL**: https://github.com/xtensor-stack/xtensor
- **Description**: C++ tensors with broadcasting and lazy computing
- **License File**: https://github.com/xtensor-stack/xtensor/blob/master/LICENSE
### cpp-httplib
- **License**: MIT License
- **Copyright**: Copyright (c) 2017 yhirose
- **URL**: https://github.com/yhirose/cpp-httplib
- **Description**: C++ single-file header-only HTTP/HTTPS library
- **Used in**: llama.cpp
- **License File**: [nexasdk-bridge/third-party/llama.cpp/licenses/LICENSE-httplib](https://github.com/ggerganov/llama.cpp/blob/master/licenses/LICENSE-httplib)
### nlohmann/json
- **License**: MIT License
- **Copyright**: Copyright (c) 2013-2025 Niels Lohmann
- **URL**: https://github.com/nlohmann/json
- **Description**: JSON for Modern C++
- **Used in**: llama.cpp
- **License File**: [nexasdk-bridge/third-party/llama.cpp/licenses/LICENSE-jsonhpp](https://github.com/ggerganov/llama.cpp/blob/master/licenses/LICENSE-jsonhpp)
---
## Python Dependencies
### gradio
- **License**: Apache License 2.0
- **URL**: https://github.com/gradio-app/gradio
- **Description**: Build machine learning web apps
### requests
- **License**: Apache License 2.0
- **URL**: https://github.com/psf/requests
- **Description**: HTTP library for Python
### Flask
- **License**: BSD 3-Clause License
- **URL**: https://github.com/pallets/flask
- **Description**: Lightweight WSGI web application framework
### faiss-cpu
- **License**: MIT License
- **URL**: https://github.com/facebookresearch/faiss
- **Description**: Library for efficient similarity search and clustering of dense vectors
### sentence-transformers
- **License**: Apache License 2.0
- **URL**: https://github.com/UKPLab/sentence-transformers
- **Description**: Compute dense vector representations for sentences and paragraphs
### langchain
- **License**: MIT License
- **URL**: https://github.com/langchain-ai/langchain
- **Description**: Building applications with LLMs through composability
### pydantic
- **License**: MIT License
- **URL**: https://github.com/pydantic/pydantic
- **Description**: Data validation using Python type hints
### python-docx
- **License**: MIT License
- **URL**: https://github.com/python-openxml/python-docx
- **Description**: Create and modify Word documents with Python
### psutil
- **License**: BSD 3-Clause License
- **URL**: https://github.com/giampaolo/psutil
- **Description**: Cross-platform library for process and system monitoring
### openai
- **License**: Apache License 2.0
- **URL**: https://github.com/openai/openai-python
- **Description**: Python library for the OpenAI API
### mcp
- **License**: MIT License
- **URL**: https://github.com/modelcontextprotocol/python-sdk
- **Description**: Model Context Protocol Python SDK
---
## Android/Java Dependencies (from bindings/android)
### AndroidX Libraries
- **License**: Apache License 2.0
- **URL**: https://developer.android.com/jetpack/androidx
- **Description**: Android Jetpack libraries
- **Packages**: core-ktx, lifecycle-runtime-ktx, activity-compose, compose-bom, appcompat, constraintlayout
### Kotlin Standard Library
- **License**: Apache License 2.0
- **URL**: https://github.com/JetBrains/kotlin
- **Description**: Kotlin programming language standard library
### AWS Android SDK S3
- **License**: Apache License 2.0
- **URL**: https://github.com/aws/aws-sdk-android
- **Description**: AWS SDK for Android - S3 support
### OkHttp
- **License**: Apache License 2.0
- **URL**: https://github.com/square/okhttp
- **Description**: HTTP client for Android and Java
### Gson
- **License**: Apache License 2.0
- **URL**: https://github.com/google/gson
- **Description**: Java serialization/deserialization library to convert Java Objects into JSON
### Glide
- **License**: BSD, MIT, and Apache License 2.0 (Multi-license)
- **URL**: https://github.com/bumptech/glide
- **Description**: Fast and efficient image loading library for Android
### Kotlinx Serialization
- **License**: Apache License 2.0
- **URL**: https://github.com/Kotlin/kotlinx.serialization
- **Description**: Multiplatform serialization for Kotlin
### Kotlinx Coroutines
- **License**: Apache License 2.0
- **URL**: https://github.com/Kotlin/kotlinx.coroutines
- **Description**: Library support for Kotlin coroutines
### Material Components for Android
- **License**: Apache License 2.0
- **URL**: https://github.com/material-components/material-components-android
- **Description**: Modular and customizable Material Design UI components
---
## Summary
All third-party libraries used in NexaSDK are licensed under permissive open-source licenses that allow for commercial and non-commercial use, modification, and distribution. The primary licenses used are:
- **MIT License**: Highly permissive, allows almost unrestricted use
- **Apache License 2.0**: Permissive license with patent grant and attribution requirements
- **BSD 3-Clause License**: Permissive license with attribution requirements
================================================
FILE: README.md
================================================
<div align="center" style="text-decoration: none;">
<img width="100%" src="assets/banner1.png" alt="Nexa AI Banner">
<p style="font-size: 1.3em; font-weight: 600; margin-bottom: 20px;">
<a href="README_zh.md"> 简体中文 </a>
|
<a href="README.md"> English </a>
</p>
<p style="font-size: 1.3em; font-weight: 600; margin-bottom: 20px;">🤝 Supported chipmakers </p>
<picture>
<source srcset="assets/chipmakers-dark.png" media="(prefers-color-scheme: dark)">
<source srcset="assets/chipmakers.png" media="(prefers-color-scheme: light)">
<img src="assets/chipmakers-dark.png" style="max-height:30px; height:auto; width:auto;">
</picture>
</p>
<p>
<a href="https://www.producthunt.com/products/nexasdk-for-mobile?embed=true&utm_source=badge-top-post-badge&utm_medium=badge&utm_campaign=badge-nexasdk-for-mobile" target="_blank" rel="noopener noreferrer">
<img alt="NexaSDK for Mobile - #1 Product of the Day" width="180" height="39" src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=1049998&theme=dark&period=daily&t=1765991451976">
</a>
<a href="https://trendshift.io/repositories/12239" target="_blank" rel="noopener noreferrer">
<img alt="NexaAI/nexa-sdk - #1 Repository of the Day" height="39" src="https://trendshift.io/api/badge/repositories/12239">
</a>
</p>
<p>
<a href="https://docs.nexa.ai">
<img src="https://img.shields.io/badge/docs-website-brightgreen?logo=readthedocs" alt="Documentation">
</a>
<a href="https://sdk.nexa.ai/wishlist">
<img src="https://img.shields.io/badge/🎯_Vote_for-Next_Models-ff69b4?style=flat-square" alt="Vote for Next Models">
</a>
<a href="https://x.com/nexa_ai"><img alt="X account" src="https://img.shields.io/twitter/url/https/twitter.com/diffuserslib.svg?style=social&label=Follow%20%40Nexa_AI"></a>
<a href="https://discord.com/invite/nexa-ai">
<img src="https://img.shields.io/discord/1192186167391682711?color=5865F2&logo=discord&logoColor=white&style=flat-square" alt="Join us on Discord">
</a>
<a href="https://join.slack.com/t/nexa-ai-community/shared_invite/zt-3837k9xpe-LEty0disTTUnTUQ4O3uuNw">
<img src="https://img.shields.io/badge/slack-join%20chat-4A154B?logo=slack&logoColor=white" alt="Join us on Slack">
</a>
</p>
</div>
# NexaSDK
**NexaSDK lets you build the smartest and fastest on-device AI with minimum energy.** It is a highly performant local inference framework that runs the latest multimodal AI models locally on NPU, GPU, and CPU - across Android, Windows, Linux, macOS, and iOS devices with a few lines of code.
NexaSDK supports latest models **weeks or months before anyone else** — Qwen3-VL, DeepSeek-OCR, Gemma3n (Vision), and more.
> ⭐ **Star this repo** to keep up with exciting updates and new releases about latest on-device AI capabilities.
## 🏆 Recognized Milestones
- **Qualcomm** featured us **3 times** in official blogs.
- [Innovating Multimodal AI on Qualcomm Hexagon NPU](https://www.qualcomm.com/developer/blog/2025/09/omnineural-4b-nexaml-qualcomm-hexagon-npu).
- [First-ever Day-0 model support on Qualcomm Hexagon NPU for compute and mobile platforms, Auto and IoT](https://www.qualcomm.com/developer/blog/2025/10/granite-4-0-to-the-edge-on-device-ai-for-real-world-performance).
- [A simple way to bring on-device AI to smartphones with Snapdragon](https://www.qualcomm.com/developer/blog/2025/11/nexa-ai-for-android-simple-way-to-bring-on-device-ai-to-smartphones-with-snapdragon)
- **Qwen** featured us for [Day-0 Qwen3-VL support on NPU, GPU, and CPU](https://x.com/Alibaba_Qwen/status/1978154384098754943). We were 3 weeks ahead of Ollama and llama.cpp on GGUF support, and no one else supports it on NPU to date.
- **IBM** featured our NexaML inference engine alongside vLLM, llama.cpp, and MLX in [official IBM blog](https://www.ibm.com/new/announcements/ibm-granite-4-0-hyper-efficient-high-performance-hybrid-models) and also for Day-0 Granite 4.0 support.
- **Google** featured us for [EmbeddingGemma Day-0 NPU support](https://x.com/googleaidevs/status/1969188152049889511).
- **AMD** featured us for [enabling SDXL-turbo image generation on AMD NPU](https://www.amd.com/en/developer/resources/technical-articles/2025/advancing-ai-with-nexa-ai--image-generation-on-amd-npu-with-sdxl.html).
- **NVIDIA** featured Hyperlink, a viral local AI app powered by NexaSDK, in their [official blog](https://blogs.nvidia.com/blog/rtx-ai-garage-nexa-hyperlink-local-agent/).
- **Microsoft** presented us on stage at Microsoft Ignite 2025 as [official partner](https://www.linkedin.com/posts/mixen_excited-to-celebrate-our-developer-partnerships-activity-7396601602327007232-AmCR?utm_source=share&utm_medium=member_desktop&rcm=ACoAAChXnS8B4gqbBLUlWfwt-ck0XAv472NzT4k).
- **Intel** featured us for [Intel NPU support in NexaSDK](https://www.linkedin.com/posts/intel-software_ai-ondeviceai-nexasdk-activity-7376337062087667712-xw7i?utm_source=share&utm_medium=member_desktop&rcm=ACoAAChXnS8B4gqbBLUlWfwt-ck0XAv472NzT4k).
## 🚀 Quick Start
| Platform | Links |
| --------------- | ----------------------------------------------------------------------------------------- |
| 🖥️ CLI | [Quick Start](#-cli) | [Docs](https://docs.nexa.ai/en/nexa-sdk-go/NexaCLI) |
| 🐍 Python | [Quick Start](#-python-sdk) | [Docs](https://docs.nexa.ai/en/nexa-sdk-python/overview) |
| 🤖 Android | [Quick Start](#-android-sdk) | [Docs](https://docs.nexa.ai/en/nexa-sdk-android/overview) |
| 🐳 Linux Docker | [Quick Start](#-linux-docker) | [Docs](https://docs.nexa.ai/en/nexa-sdk-docker/overview) |
| 🍎 iOS | [Quick Start](#-ios-sdk) | [Docs](https://docs.nexa.ai/en/nexa-sdk-ios/overview) |
---
### 🖥️ CLI
**Download:**
| Windows | macOS | Linux |
| -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| [arm64 (Qualcomm NPU)](https://public-storage.nexa4ai.com/nexa_sdk/downloads/nexa-cli_windows_arm64.exe) | [arm64 (Apple Silicon)](https://public-storage.nexa4ai.com/nexa_sdk/downloads/nexa-cli_macos_arm64.pkg) | [arm64](https://github.com/NexaAI/nexa-sdk/releases/latest/download/nexa-cli_linux_arm64.sh) |
| [x64 (Intel/AMD NPU)](https://public-storage.nexa4ai.com/nexa_sdk/downloads/nexa-cli_windows_x86_64.exe) | [x64](https://public-storage.nexa4ai.com/nexa_sdk/downloads/nexa-cli_macos_x86_64.pkg) | [x64](https://github.com/NexaAI/nexa-sdk/releases/latest/download/nexa-cli_linux_x86_64.sh) |
**Run your first model:**
```bash
# Chat with Qwen3
nexa infer ggml-org/Qwen3-1.7B-GGUF
# Multimodal: drag images into the CLI
nexa infer NexaAI/Qwen3-VL-4B-Instruct-GGUF
# NPU (Windows arm64 with Snapdragon X Elite)
nexa infer NexaAI/OmniNeural-4B
```
- **Models:** LLM, Multimodal, ASR, OCR, Rerank, Object Detection, Image Generation, Embedding
- **Formats:** GGUF, MLX, NEXA
- **NPU Models:** [Model Hub](https://sdk.nexa.ai/model)
- 📖 [CLI Reference Docs](https://docs.nexa.ai/en/nexa-sdk-go/NexaCLI)
---
### 🐍 Python SDK
```bash
pip install nexaai
```
```python
from nexaai import LLM, GenerationConfig, ModelConfig, LlmChatMessage
llm = LLM.from_(model="NexaAI/Qwen3-0.6B-GGUF", config=ModelConfig())
conversation = [
LlmChatMessage(role="user", content="Hello, tell me a joke")
]
prompt = llm.apply_chat_template(conversation)
for token in llm.generate_stream(prompt, GenerationConfig(max_tokens=100)):
print(token, end="", flush=True)
```
- **Models:** LLM, Multimodal, ASR, OCR, Rerank, Object Detection, Image Generation, Embedding
- **Formats:** GGUF, MLX, NEXA
- **NPU Models:** [Model Hub](https://sdk.nexa.ai/model)
- 📖 [Python SDK Docs](https://docs.nexa.ai/en/nexa-sdk-python/quickstart)
---
### 🤖 Android SDK
Add to your `app/AndroidManifest.xml`
```xml
<application android:extractNativeLibs="true">
```
Add to your `build.gradle.kts`:
```kotlin
dependencies {
implementation("ai.nexa:core:0.0.19")
}
```
```kotlin
// Initialize SDK
NexaSdk.getInstance().init(this)
// Load and run model
VlmWrapper.builder()
.vlmCreateInput(VlmCreateInput(
model_name = "omni-neural",
model_path = "/data/data/your.app/files/models/OmniNeural-4B/files-1-1.nexa",
plugin_id = "npu",
config = ModelConfig()
))
.build()
.onSuccess { vlm ->
vlm.generateStreamFlow("Hello!", GenerationConfig()).collect { print(it) }
}
```
- **Requirements:** Android minSdk 27, Qualcomm Snapdragon 8 Gen 4 Chip
- **Models:** LLM, Multimodal, ASR, OCR, Rerank, Embedding
- **NPU Models:** [Supported Models](https://docs.nexa.ai/en/nexa-sdk-android/overview#supported-models)
- 📖 [Android SDK Docs](https://docs.nexa.ai/en/nexa-sdk-android/quickstart)
---
### 🐳 Linux Docker
```bash
docker pull nexa4ai/nexasdk:latest
export NEXA_TOKEN="your_token_here"
docker run --rm -it --privileged \
-e NEXA_TOKEN \
nexa4ai/nexasdk:latest infer NexaAI/Granite-4.0-h-350M-NPU
```
- **Requirements:** Qualcomm Dragonwing IQ9, ARM64 systems
- **Models:** LLM, VLM, ASR, CV, Rerank, Embedding
- **NPU Models:** [Supported Models](https://docs.nexa.ai/en/nexa-sdk-docker/overview#supported-models)
- 📖 [Linux Docker Docs](https://docs.nexa.ai/en/nexa-sdk-docker/quickstart)
---
### 🍎 iOS SDK
Download [NexaSdk.xcframework](https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/ios/latest/NexaSdk.xcframework.zip) and add to your Xcode project.
```swift
import NexaSdk
// Example: Speech Recognition
let asr = try Asr(plugin: .ane)
try await asr.load(from: modelURL)
let result = try await asr.transcribe(options: .init(audioPath: "audio.wav"))
print(result.asrResult.transcript)
```
- **Requirements:** iOS 17.0+ / macOS 15.0+, Swift 5.9+
- **Models:** LLM, ASR, OCR, Rerank, Embedding
- **ANE Models:** [Apple Neural Engine Models](https://huggingface.co/collections/NexaAI/apple-neural-engine)
- 📖 [iOS SDK Docs](https://docs.nexa.ai/en/nexa-sdk-ios/quickstart)
## ⚙️ Features & Comparisons
<div align="center">
| Features | **NexaSDK** | **Ollama** | **llama.cpp** | **LM Studio** |
| ---------------------------------------- | ---------------------------------------------------------- | ---------- | ------------- | ------------- |
| NPU support | ✅ NPU-first | ❌ | ❌ | ❌ |
| Android/iOS SDK support | ✅ NPU/GPU/CPU support | ⚠️ | ⚠️ | ❌ |
| Linux support (Docker image) | ✅ | ✅ | ✅ | ❌ |
| Day-0 model support in GGUF, MLX, NEXA | ✅ | ❌ | ⚠️ | ❌ |
| Full multimodality support | ✅ Image, Audio, Text, Embedding, Rerank, ASR, TTS | ⚠️ | ⚠️ | ⚠️ |
| Cross-platform support | ✅ Desktop, Mobile (Android, iOS), Automotive, IoT (Linux) | ⚠️ | ⚠️ | ⚠️ |
| One line of code to run | ✅ | ✅ | ⚠️ | ✅ |
| OpenAI-compatible API + Function calling | ✅ | ✅ | ✅ | ✅ |
<p align="center" style="margin-top:14px">
<i>
<b>Legend:</b>
<span title="Full support">✅ Supported</span> |
<span title="Partial or limited support">⚠️ Partial or limited support </span> |
<span title="Not Supported">❌ No</span>
</i>
</p>
</div>
## 🙏 Acknowledgements
We would like to thank the following projects:
- [ggml](https://github.com/ggml-org/ggml)
- [mlx-lm](https://github.com/ml-explore/mlx-lm)
- [mlx-vlm](https://github.com/Blaizzy/mlx-vlm)
- [mlx-audio](https://github.com/Blaizzy/mlx-audio)
## 📄 License
NexaSDK uses a dual licensing model:
### CPU/GPU Components
Licensed under [Apache License 2.0](LICENSE).
### NPU Components
- **Personal Use**: Free license key available from [Nexa AI Model Hub](https://sdk.nexa.ai/model). Each key activates 1 device for NPU usage.
- **Commercial Use**: Contact [hello@nexa.ai](mailto:hello@nexa.ai) for licensing.
## 🤝 Contact & Community Support
### Business Inquiries
For model launching partner, business inquiries, or any other questions, please schedule a call with us [here](https://nexa.ai/book-a-call).
### Community & Support
Want more model support, backend support, device support or other features? We'd love to hear from you!
Feel free to [submit an issue](https://github.com/NexaAI/nexa-sdk/issues) on our GitHub repository with your requests, suggestions, or feedback. Your input helps us prioritize what to build next.
Join our community:
- [Discord](https://discord.gg/thRu2HaK4D)
- [Slack](https://join.slack.com/t/nexaai/shared_invite/zt-30a8yfv8k-1JqAXv~OjKJKLqvbKqHJxA)
- **[Nexa Wishlist](https://sdk.nexa.ai/wishlist)** — Request and vote for the models you want to run on-device.
## 🏆 Nexa × Qualcomm On-Device Bounty Program
Round 1: Build a working Android AI app that runs fully on-device on Qualcomm Hexagon NPU with NexaSDK.
Timeline (PT): Jan 15 → Feb 15
Prizes: $6,500 cash prize, Qualcomm official spotlight, flagship Snapdragon device, expert mentorship, and more
👉 Join & details: [https://sdk.nexa.ai/bounty](https://sdk.nexa.ai/bounty)
================================================
FILE: README_zh.md
================================================
<div align="center" style="text-decoration: none;">
<img width="100%" src="assets/banner1.png" alt="Nexa AI Banner">
<p style="font-size: 1.3em; font-weight: 600; margin-bottom: 20px;">
<a href="README_zh.md"> 简体中文 </a>
|
<a href="README.md"> English </a>
</p>
<p style="font-size: 1.3em; font-weight: 600; margin-bottom: 20px;">🤝 支持的芯片厂商 </p>
<picture>
<source srcset="assets/chipmakers-dark.png" media="(prefers-color-scheme: dark)">
<source srcset="assets/chipmakers.png" media="(prefers-color-scheme: light)">
<img src="assets/chipmakers.png" style="max-height:30px; height:auto; width:auto;">
</picture>
</p>
<p>
<a href="https://www.producthunt.com/products/nexasdk-for-mobile?embed=true&utm_source=badge-top-post-badge&utm_medium=badge&utm_campaign=badge-nexasdk-for-mobile" target="_blank" rel="noopener noreferrer">
<img alt="NexaSDK for Mobile - #1 Product of the Day" width="180" height="39" src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=1049998&theme=dark&period=daily&t=1765991451976">
</a>
<a href="https://trendshift.io/repositories/12239" target="_blank" rel="noopener noreferrer">
<img alt="NexaAI/nexa-sdk - #1 Repository of the Day" height="39" src="https://trendshift.io/api/badge/repositories/12239">
</a>
</p>
<p>
<a href="https://docs.nexa.ai">
<img src="https://img.shields.io/badge/docs-website-brightgreen?logo=readthedocs" alt="Documentation">
</a>
<a href="https://sdk.nexa.ai/wishlist">
<img src="https://img.shields.io/badge/🎯_Vote_for-Next_Models-ff69b4?style=flat-square" alt="Vote for Next Models">
</a>
<a href="https://x.com/nexa_ai"><img alt="X account" src="https://img.shields.io/twitter/url/https/twitter.com/diffuserslib.svg?style=social&label=Follow%20%40Nexa_AI"></a>
<a href="https://discord.com/invite/nexa-ai">
<img src="https://img.shields.io/discord/1192186167391682711?color=5865F2&logo=discord&logoColor=white&style=flat-square" alt="Join us on Discord">
</a>
<a href="https://join.slack.com/t/nexa-ai-community/shared_invite/zt-3837k9xpe-LEty0disTTUnTUQ4O3uuNw">
<img src="https://img.shields.io/badge/slack-join%20chat-4A154B?logo=slack&logoColor=white" alt="Join us on Slack">
</a>
</p>
</div>
# NexaSDK
**NexaSDK 让你用极低能耗打造最快、最聪明的本地 AI。** 它是一套高性能本地推理框架,只需几行代码即可在 Android、Windows、Linux、macOS 与 iOS 的 NPU、GPU、CPU 上运行最新的多模态 AI 模型。
NexaSDK 往往能比其他人提前数周甚至数月支持最新模型 —— Qwen3-VL、DeepSeek-OCR、Gemma3n(视觉版)等。
> ⭐ **star本仓库**,及时获取最新的本地 AI 能力更新与发布。
## 🏆 重要里程碑
- **Qualcomm** 官方博客中 3 次重点介绍我们。
- [在 Qualcomm Hexagon NPU 上创新多模态 AI](https://www.qualcomm.com/developer/blog/2025/09/omnineural-4b-nexaml-qualcomm-hexagon-npu)。
- [Qualcomm Hexagon NPU 在计算与移动平台(汽车与 IoT)上的首个 Day-0 模型支持](https://www.qualcomm.com/developer/blog/2025/10/granite-4-0-to-the-edge-on-device-ai-for-real-world-performance)。
- [在 Snapdragon 手机上体验端侧 AI 的简单方式](https://www.qualcomm.com/developer/blog/2025/11/nexa-ai-for-android-simple-way-to-bring-on-device-ai-to-smartphones-with-snapdragon)
- **Qwen** 为我们在 NPU、GPU、CPU 上 [Day-0 支持 Qwen3-VL](https://x.com/Alibaba_Qwen/status/1978154384098754943) 做了官方推荐。我们在 GGUF 支持上领先 Ollama 和 llama.cpp 3 周,并且目前只有我们支持 NPU。
- **IBM** 在[官方博客](https://www.ibm.com/new/announcements/ibm-granite-4-0-hyper-efficient-high-performance-hybrid-models)中,将 NexaML 推理引擎与 vLLM、llama.cpp、MLX 并列介绍,感谢我们 Day-0 支持 Granite 4.0。
- **Google** 认可我们对 EmbeddingGemma Day-0 的 NPU 支持([官方致谢](https://x.com/googleaidevs/status/1969188152049889511))。
- **AMD** 在[官方博客](https://www.amd.com/en/developer/resources/technical-articles/2025/advancing-ai-with-nexa-ai--image-generation-on-amd-npu-with-sdxl.html)报道我们在 AMD NPU 上实现 SDXL-turbo 图像生成。
- **NVIDIA** 在[官方博客](https://blogs.nvidia.com/blog/rtx-ai-garage-nexa-hyperlink-local-agent/)中介绍了由 NexaSDK 支撑的火爆本地 AI 应用 Hyperlink。
- **Microsoft** 在 Microsoft Ignite 2025 上台展示了我们作为[官方合作伙伴](https://www.linkedin.com/posts/mixen_excited-to-celebrate-our-developer-partnerships-activity-7396601602327007232-AmCR?utm_source=share&utm_medium=member_desktop&rcm=ACoAAChXnS8B4gqbBLUlWfwt-ck0XAv472NzT4k)。
- **Intel** 在[官方帖子](https://www.linkedin.com/posts/intel-software_ai-ondeviceai-nexasdk-activity-7376337062087667712-xw7i?utm_source=share&utm_medium=member_desktop&rcm=ACoAAChXnS8B4gqbBLUlWfwt-ck0XAv472NzT4k)中提到我们对 Intel NPU 的支持。
## 🚀 快速开始
| 平台 | 链接 |
| --------------- | ---------------------------------------------------------------------------------------------- |
| 🖥️ CLI | [快速开始](#-cli) | [文档](https://docs.nexa.ai/en/nexa-sdk-go/NexaCLI) |
| 🐍 Python | [快速开始](#-python-sdk) | [文档](https://docs.nexa.ai/en/nexa-sdk-python/overview) |
| 🤖 Android | [快速开始](#-android-sdk) | [文档](https://docs.nexa.ai/en/nexa-sdk-android/overview) |
| 🐳 Linux Docker | [快速开始](#-linux-docker) | [文档](https://docs.nexa.ai/en/nexa-sdk-docker/overview) |
| 🍎 iOS | [快速开始](#-ios-sdk) | [文档](https://docs.nexa.ai/en/nexa-sdk-ios/overview) |
---
### 🖥️ CLI
**下载:**
| Windows | macOS | Linux |
| -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| [arm64 (Qualcomm NPU)](https://public-storage.nexa4ai.com/nexa_sdk/downloads/nexa-cli_windows_arm64.exe) | [arm64 (Apple Silicon)](https://public-storage.nexa4ai.com/nexa_sdk/downloads/nexa-cli_macos_arm64.pkg) | [arm64](https://github.com/NexaAI/nexa-sdk/releases/latest/download/nexa-cli_linux_arm64.sh) |
| [x64 (Intel/AMD NPU)](https://public-storage.nexa4ai.com/nexa_sdk/downloads/nexa-cli_windows_x86_64.exe) | [x64](https://public-storage.nexa4ai.com/nexa_sdk/downloads/nexa-cli_macos_x86_64.pkg) | [x64](https://github.com/NexaAI/nexa-sdk/releases/latest/download/nexa-cli_linux_x86_64.sh) |
**运行你的第一个模型:**
```bash
# 与 Qwen3 对话
nexa infer ggml-org/Qwen3-1.7B-GGUF
# 多模态:在 CLI 中拖入图片
nexa infer NexaAI/Qwen3-VL-4B-Instruct-GGUF
# NPU(Windows arm64,Snapdragon X Elite)
nexa infer NexaAI/OmniNeural-4B
```
- **模型类型:** LLM、多模态、ASR、OCR、Rerank、目标检测、图像生成、Embedding
- **格式:** GGUF、MLX、NEXA
- **NPU 模型:** [Model Hub](https://sdk.nexa.ai/model)
- 📖 [CLI 参考文档](https://docs.nexa.ai/en/nexa-sdk-go/NexaCLI)
---
### 🐍 Python SDK
```bash
pip install nexaai
```
```python
from nexaai import LLM, GenerationConfig, ModelConfig, LlmChatMessage
llm = LLM.from_(model="NexaAI/Qwen3-0.6B-GGUF", config=ModelConfig())
conversation = [
LlmChatMessage(role="user", content="Hello, tell me a joke")
]
prompt = llm.apply_chat_template(conversation)
for token in llm.generate_stream(prompt, GenerationConfig(max_tokens=100)):
print(token, end="", flush=True)
```
- **模型类型:** LLM、多模态、ASR、OCR、Rerank、目标检测、图像生成、Embedding
- **格式:** GGUF、MLX、NEXA
- **NPU 模型:** [Model Hub](https://sdk.nexa.ai/model)
- 📖 [Python SDK 文档](https://docs.nexa.ai/en/nexa-sdk-python/quickstart)
---
### 🤖 Android SDK
在 `app/AndroidManifest.xml` 中添加:
```xml
<application android:extractNativeLibs="true">
```
在 `build.gradle.kts` 中添加:
```kotlin
dependencies {
implementation("ai.nexa:core:0.0.19")
}
```
```kotlin
// 初始化 SDK
NexaSdk.getInstance().init(this)
// 加载并运行模型
VlmWrapper.builder()
.vlmCreateInput(VlmCreateInput(
model_name = "omni-neural",
model_path = "/data/data/your.app/files/models/OmniNeural-4B/files-1-1.nexa",
plugin_id = "npu",
config = ModelConfig()
))
.build()
.onSuccess { vlm ->
vlm.generateStreamFlow("Hello!", GenerationConfig()).collect { print(it) }
}
```
- **要求:** Android minSdk 27,Qualcomm Snapdragon 8 Gen 4 芯片
- **模型类型:** LLM、多模态、ASR、OCR、Rerank、Embedding
- **NPU 模型:** [Supported Models](https://docs.nexa.ai/en/nexa-sdk-android/overview#supported-models)
- 📖 [Android SDK 文档](https://docs.nexa.ai/en/nexa-sdk-android/quickstart)
---
### 🐳 Linux Docker
```bash
docker pull nexa4ai/nexasdk:latest
export NEXA_TOKEN="your_token_here"
docker run --rm -it --privileged \
-e NEXA_TOKEN \
nexa4ai/nexasdk:latest infer NexaAI/Granite-4.0-h-350M-NPU
```
- **要求:** Qualcomm Dragonwing IQ9,ARM64 系统
- **模型类型:** LLM、VLM、ASR、CV、Rerank、Embedding
- **NPU 模型:** [Supported Models](https://docs.nexa.ai/en/nexa-sdk-docker/overview#supported-models)
- 📖 [Linux Docker 文档](https://docs.nexa.ai/en/nexa-sdk-docker/quickstart)
---
### 🍎 iOS SDK
下载 [NexaSdk.xcframework](https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/ios/latest/NexaSdk.xcframework.zip) 并添加到 Xcode 项目。
```swift
import NexaSdk
// 示例:语音识别
let asr = try Asr(plugin: .ane)
try await asr.load(from: modelURL)
let result = try await asr.transcribe(options: .init(audioPath: "audio.wav"))
print(result.asrResult.transcript)
```
- **要求:** iOS 17.0+ / macOS 15.0+,Swift 5.9+
- **模型类型:** LLM、ASR、OCR、Rerank、Embedding
- **ANE 模型:** [Apple Neural Engine Models](https://huggingface.co/collections/NexaAI/apple-neural-engine)
- 📖 [iOS SDK 文档](https://docs.nexa.ai/en/nexa-sdk-ios/quickstart)
## ⚙️ 功能与对比
<div align="center">
| 功能 | **NexaSDK** | **Ollama** | **llama.cpp** | **LM Studio** |
| -------------------------------------- | ---------------------------------------------------------- | ---------- | ------------- | ------------- |
| NPU 支持 | ✅ NPU 优先 | ❌ | ❌ | ❌ |
| Android/iOS SDK 支持 | ✅ NPU/GPU/CPU 支持 | ⚠️ | ⚠️ | ❌ |
| Linux 支持(Docker 镜像) | ✅ | ✅ | ✅ | ❌ |
| Day-0 支持 GGUF、MLX、NEXA | ✅ | ❌ | ⚠️ | ❌ |
| 完整多模态支持 | ✅ 图像、音频、文本、Embedding、Rerank、ASR、TTS | ⚠️ | ⚠️ | ⚠️ |
| 跨平台支持 | ✅ 桌面、移动(Android、iOS)、车载、IoT(Linux) | ⚠️ | ⚠️ | ⚠️ |
| 一行代码即可运行 | ✅ | ✅ | ⚠️ | ✅ |
| OpenAI 兼容 API + Function calling | ✅ | ✅ | ✅ | ✅ |
<p align="center" style="margin-top:14px">
<i>
<b>图例:</b>
<span title="Full support">✅ Supported</span> |
<span title="Partial or limited support">⚠️ Partial or limited support </span> |
<span title="Not Supported">❌ No</span>
</i>
</p>
</div>
## 🙏 致谢
我们感谢以下项目:
- [ggml](https://github.com/ggml-org/ggml)
- [mlx-lm](https://github.com/ml-explore/mlx-lm)
- [mlx-vlm](https://github.com/Blaizzy/mlx-vlm)
- [mlx-audio](https://github.com/Blaizzy/mlx-audio)
## 📄 许可证
NexaSDK 采用双重许可模式:
### CPU/GPU 组件
基于 [Apache License 2.0](LICENSE)。
### NPU 组件
- **个人使用**:可从 [Nexa AI Model Hub](https://sdk.nexa.ai/model) 免费获取许可密钥。每个密钥激活 1 台设备的 NPU 使用。
- **商业使用**:联系 [hello@nexa.ai](mailto:hello@nexa.ai) 获取授权。
## 🤝 联系与社区支持
### 商务合作
如需模型发布合作、商务洽谈或其他问题,请在[此处](https://nexa.ai/book-a-call)安排会议。
### 社区与支持
想要更多模型支持、后端支持、设备支持或新功能?我们很乐意听到你的声音!
欢迎在 GitHub [提交 issue](https://github.com/NexaAI/nexa-sdk/issues),提出你的需求、建议或反馈。你的意见帮助我们确定优先级。
加入社区:
- [Discord](https://discord.gg/thRu2HaK4D)
- [Slack](https://join.slack.com/t/nexaai/shared_invite/zt-30a8yfv8k-1JqAXv~OjKJKLqvbKqHJxA)
- **[Nexa Wishlist](https://sdk.nexa.ai/wishlist)** —— 提交并为你想要运行在本地的模型投票。
================================================
FILE: bindings/android/.gitignore
================================================
# Gradle files
.gradle/
build/
arm64-v8a/
.DS_Store
# Local configuration file (sdk path, etc)
local.properties
# Log/OS Files
*.log
# Android Studio generated files and folders
captures/
.externalNativeBuild/
.cxx/
*.aab
*.apk
output-metadata.json
# IntelliJ
*.iml
.idea/
misc.xml
deploymentTargetDropDown.xml
render.experimental.xml
# Keystore files
*.jks
*.keystore
# Google Services (e.g. APIs or Firebase)
google-services.json
# Android Profiling
*.hprof
app/libs/app-release.aar
app/libs/app-debug.aar
app/release/
repo/
================================================
FILE: bindings/android/README.md
================================================
# Nexa Android SDK Demo App
[](https://www.producthunt.com/products/nexasdk-for-mobile)
> 📣 **NexaSDK for Android** is highlighted by [Qualcomm blog](https://www.qualcomm.com/developer/blog/2025/11/nexa-ai-for-android-simple-way-to-bring-on-device-ai-to-smartphones-with-snapdragon) as "a simple way to bring on-device AI to smartphones with Snapdragon"
## Overview
The Nexa AI Android SDK enables on-device AI inference for Android applications with NPU acceleration. Run Large Language Models (LLMs), Vision-Language Models (VLMs), Embeddings, Speech Recognition (ASR), Reranking, and Computer Vision models on Android devices with support for NPU, GPU, and CPU inference.
📖 For full documentation, see [Android SDK Doc](https://docs.nexa.ai/en/nexa-sdk-android/overview).
## Device Compatibility
### Supported Hardware
| Component | Requirement |
|-----------|-------------|
| **NPU** | Qualcomm Snapdragon 8 Gen 4 (optimized) |
| **GPU** | Qualcomm Adreno GPU |
| **CPU** | ARM64-v8a |
| **RAM** | 4GB+ recommended |
| **Storage** | 100MB - 4GB (varies by model) |
### Minimum Requirements
- Android API Level 27+ (Android 8.1 Oreo)
- Architecture: ARM64-v8a
## Quick Start with APK
### Standard Demo App
Download and install the pre-built APK:
```bash
# Download: https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/android-demo-release/nexaai-demo-app.apk
adb install nexaai-demo-app.apk
```
### GPT-OSS NPU Demo
For running GPT-OSS model on Qualcomm NPU:
```bash
# Download: https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/gpt-oss-android-demo/nexaai-gpt-oss-npu.apk
adb install nexaai-gpt-oss-npu.apk
```
## Build from Source
> 🎬 Watch the [tutorial video](https://www.linkedin.com/feed/update/urn:li:activity:7394055404562935809) showing how to run the sample app in 40 seconds.
### Step-by-Step Instructions
1. **Clone the repository**
```bash
git clone https://github.com/NexaAI/nexa-sdk/
```
2. **Open in Android Studio**
Open the `bindings/android` folder in Android Studio.
3. **Download a model**
Follow the [Android SDK Doc](https://docs.nexa.ai/en/nexa-sdk-android/overview) to download a model. Below are some examples to download:
- [Granite-4.0-h-350M-NPU](https://huggingface.co/NexaAI/Granite-4.0-h-350M-NPU-mobile)
- [Granite-4-Micro-NPU](https://huggingface.co/NexaAI/Granite-4-Micro-NPU-mobile)
- [OmniNeural-4B](https://huggingface.co/NexaAI/OmniNeural-4B-mobile)
Place the model in the app's data directory:
```
/data/data/com.nexa.demo/files/models/<model-name>
```
4. **Build and run** the app in Android Studio
## Tutorial: LFM2-24B-A2B-Preview-GGUF
This walkthrough uses the [LFM2-24B-A2B-Preview-GGUF](https://huggingface.co/NexaAI/LFM2-24B-A2B-Preview-GGUF) model in the demo app.
1. **Install the app**
Install the demo app (APK or build from source as above).
2. **Select the model**
Open the model selector (dropdown next to the model name) and choose **LFM2-24B-A2B-Preview-GGUF**.
<img src="../../assets/lfm0.png" width="240" alt="LFM2-24B-A2B-Preview-GGUF in demo app" />
3. **Download**
Tap **Download** to fetch the model to your device. Wait until the download finishes.
4. **Load**
Tap **Load**. A **load model config** dialog appears: choose **CPU**, **GPU**, or **NPU** (for Qualcomm NPU), then tap **SURE**. Once the model is loaded, the chat area becomes available.
<img src="../../assets/lfm1.png" width="240" alt="load model config" />
5. **Chat**
Type your message in the input field at the bottom, then tap **Send** to get a response. Use **Clear** to clear the input or conversation as needed.
<img src="../../assets/lfm2.png" width="240" alt="Chat with model response" />
================================================
FILE: bindings/android/README_zh.md
================================================
# Nexa Android SDK 演示 App
[](https://www.producthunt.com/products/nexasdk-for-mobile)
> 📣 **NexaSDK for Android** 被 [Qualcomm 博客](https://www.qualcomm.com/developer/blog/2025/11/nexa-ai-for-android-simple-way-to-bring-on-device-ai-to-smartphones-with-snapdragon) 评价为"将端侧 AI 引入 Snapdragon 智能手机的简易方案"
## 概述
Nexa AI Android SDK 让 Android 应用可以在设备端使用 NPU 加速进行 AI 推理。支持在 Android 设备上运行大型语言模型(LLMs)、视觉语言模型(VLMs)、嵌入模型、语音识别(ASR)、重排序和计算机视觉模型,并可在 NPU、GPU 或 CPU 上进行推理。
📖 完整文档请参考 [Android SDK 文档](https://docs.nexa.ai/cn/nexa-sdk-android/overview)。
## 设备兼容性
### 支持的硬件
| 组件 | 要求 |
|-----------|-------------|
| **NPU** | 高通骁龙 8 Gen 4(已优化) |
| **GPU** | 高通 Adreno GPU |
| **CPU** | ARM64-v8a |
| **RAM** | 推荐 4GB 及以上 |
| **存储** | 100MB - 4GB(具体取决于模型) |
### 最低要求
- Android API 等级 27 及以上(Android 8.1 Oreo)
- 架构:ARM64-v8a
## 快速开始(APK 安装)
### 标准演示 App
下载并安装预编译的 APK:
```bash
# 下载地址: https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/android-demo-release/nexaai-demo-app.apk
adb install nexaai-demo-app.apk
```
### GPT-OSS NPU 演示
在高通 NPU 上运行 GPT-OSS 模型:
```bash
# 下载地址: https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/gpt-oss-android-demo/nexaai-gpt-oss-npu.apk
adb install nexaai-gpt-oss-npu.apk
```
## 从源码编译
> 🎬 观看 [教程视频](https://www.linkedin.com/feed/update/urn:li:activity:7394055404562935809),只需 40 秒即可体验如何运行示例 App。
### 详细步骤
1. **克隆仓库**
```bash
git clone https://github.com/NexaAI/nexa-sdk/
```
2. **用 Android Studio 打开**
用 Android Studio 打开 `bindings/android` 文件夹。
3. **下载模型**
按照 [Android SDK 文档](https://docs.nexa.ai/cn/nexa-sdk-android/overview) 的说明下载模型。以下是一些可下载的示例:
- [Granite-4.0-h-350M-NPU](https://huggingface.co/NexaAI/Granite-4.0-h-350M-NPU-mobile)
- [Granite-4-Micro-NPU](https://huggingface.co/NexaAI/Granite-4-Micro-NPU-mobile)
- [OmniNeural-4B](https://huggingface.co/NexaAI/OmniNeural-4B-mobile)
将模型放到 App 的数据目录:
```
/data/data/com.nexa.demo/files/models/<model-name>
```
4. **编译并运行** 在 Android Studio 中编译并运行应用
================================================
FILE: bindings/android/app/.gitignore
================================================
/build
/src/main/assets/model_list_backup.json
/src/main/assets/model_list_local.json
================================================
FILE: bindings/android/app/build.gradle.kts
================================================
// Copyright 2024-2026 Nexa AI, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
id("org.jetbrains.kotlin.plugin.serialization") version "1.9.23"
}
android {
namespace = "com.nexa.demo"
compileSdk = 36
signingConfigs {
create("release") {
// Note: For production builds, use environment variables or local.properties
// Example: storePassword = System.getenv("KEYSTORE_PASSWORD") ?: ""
storeFile = file("test")
storePassword = project.findProperty("KEYSTORE_PASSWORD")?.toString() ?: "123456"
keyAlias = "test"
keyPassword = project.findProperty("KEY_PASSWORD")?.toString() ?: "123456"
}
}
defaultConfig {
applicationId = "com.nexa.demo"
minSdk = 27
targetSdk = 36
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
signingConfig = signingConfigs.getByName("release")
}
debug {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
signingConfig = signingConfigs.getByName("release")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = "11"
}
// sourceSets {
// getByName("main") {
// jniLibs.srcDirs("src/main/jniLibs")
// }
// }
packagingOptions {
jniLibs.useLegacyPackaging = true
}
buildFeatures {
viewBinding = true
dataBinding = true
compose = true
buildConfig = true
}
}
val bridgePathExist = gradle.extra["bridgePathExist"] as Boolean
print("bridgePathExist: $bridgePathExist\n")
dependencies {
// ===== NEXA CLOUD SDK =====
// Using cloud SDK instead of local bridge - latest version
implementation("ai.nexa:core:+")
// ===== NEXA CLOUD SDK END =====
implementation(project(":transform"))
implementation(":okdownload-core@aar")
implementation(":okdownload-sqlite@aar")
implementation(":okdownload-okhttp@aar")
implementation(":okdownload-ktx@aar")
implementation(kotlin("reflect"))
implementation(libs.glide)
implementation(libs.gson)
implementation(libs.markwon.core)
implementation(libs.markwon.strikethrough)
implementation(libs.markwon.tables)
implementation(libs.markwon.linkify)
implementation(libs.markwon.latex)
implementation(libs.markwon.inline.parser)
implementation(libs.recyclerview)
implementation(libs.toaster)
implementation(libs.material)
implementation(libs.imm.bar)
implementation(libs.imm.bar.ktx)
implementation(libs.auto.size)
implementation(libs.okhttp)
implementation(libs.kotlinx.serialization.json)
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.activity.compose)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.ui)
implementation(libs.androidx.ui.graphics)
implementation(libs.androidx.ui.tooling.preview)
implementation(libs.androidx.material3)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.activity)
implementation(libs.androidx.constraintlayout)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.ui.test.junit4)
debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.test.manifest)
}
================================================
FILE: bindings/android/app/proguard-rules.pro
================================================
# Copyright 2024-2026 Nexa AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
================================================
FILE: bindings/android/app/src/androidTest/java/com/nexa/demo/ExampleInstrumentedTest.kt
================================================
// Copyright 2024-2026 Nexa AI, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.nexa.demo
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Assert.*
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.nexa.demo", appContext.packageName)
}
}
================================================
FILE: bindings/android/app/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2024-2026 Nexa AI, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
<application
android:name=".MyApplication"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:extractNativeLibs="true"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MaterialComponents.Light.NoActionBar">
<activity
android:name=".activity.FileContentActivity"
android:exported="false" />
<meta-data
android:name="design_width_in_dp"
android:value="360" />
<meta-data
android:name="design_height_in_dp"
android:value="724" />
<activity
android:name=".MainActivity"
android:exported="true"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application>
</manifest>
================================================
FILE: bindings/android/app/src/main/assets/model_list.json
================================================
[
{
"id": "Llama3.2-3B-NPU-Turbo-NPU",
"displayName": "Llama3.2-3B-NPU-Turbo-NPU",
"modelName": "files-1-2.nexa",
"versionCode": 1,
"baseUrl": "https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/Llama3.2-3B-NPU-Turbo-NPU-mobile/",
"modelUrl": "files-1-2.nexa"
},
{
"id": "Llama-3.2-3B-Instruct-GGUF",
"displayName": "Llama-3.2-3B-Instruct-GGUF",
"modelName": "Llama-3.2-3B-Instruct-Q4_0.gguf",
"type": "chat",
"versionCode": 1,
"pluginIds": 17,
"modelUrl": "https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_0.gguf"
},
{
"id": "Qwen3-4B-Instruct-2507-npu",
"displayName": "Qwen3-4B-Instruct-2507-npu",
"modelName": "files-1-1.nexa",
"versionCode": 1,
"baseUrl": "https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/Qwen3-4B-Instruct-2507-npu-mobile/",
"modelUrl": "files-1-1.nexa"
},
{
"id": "gpt-oss-20b-GGUF",
"displayName": "gpt-oss-20b-GGUF",
"modelName": "gpt-oss-20b-Q4_0.gguf",
"type": "chat",
"versionCode": 1,
"pluginIds": 17,
"modelUrl": "https://huggingface.co/unsloth/gpt-oss-20b-GGUF/resolve/main/gpt-oss-20b-Q4_0.gguf"
},
{
"id": "Qwen3-4B-GGUF",
"displayName": "Qwen3-4B-GGUF",
"modelName": "Qwen3-4B-Q4_0.gguf",
"type": "chat",
"versionCode": 1,
"pluginIds": 17,
"modelUrl": "https://huggingface.co/unsloth/Qwen3-4B-GGUF/resolve/main/Qwen3-4B-Q4_0.gguf"
},
{
"id": "Granite-4-Micro-NPU",
"displayName": "Granite-4.0-Micro 3B",
"modelName": "files-1-2.nexa",
"versionCode": 1,
"baseUrl": "https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/Granite-4-Micro-NPU-mobile/",
"modelUrl": "files-1-2.nexa"
},
{
"id": "LFM2-1.2B-npu",
"displayName": "LFM2-1.2B-npu",
"modelName": "files-1-2.nexa",
"versionCode": 1,
"baseUrl": "https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/LFM2-1.2B-npu-mobile/",
"modelUrl": "files-1-2.nexa"
},
{
"id": "LFM2.5-1.2B-mobile",
"displayName": "LFM2.5-1.2B-npu",
"modelName": "files-1-2.nexa",
"versionCode": 1,
"baseUrl": "https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/LFM2.5-1.2B-mobile/",
"modelUrl": "files-1-2.nexa"
},
{
"id": "OmniNeural-4B",
"displayName": "OmniNeural-4B",
"modelName": "files-1-1.nexa",
"versionCode": 1,
"baseUrl": "https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/OmniNeural-4B-mobile/",
"modelUrl": "files-1-1.nexa"
},
{
"id": "paddleocr-npu",
"displayName": "paddleocr-npu",
"modelName": "weights-1-1.nexa",
"versionCode": 1,
"baseUrl": "https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/paddleocr-npu-mobile/",
"modelUrl": "weights-1-1.nexa"
},
{
"id": "yolo26x-npu",
"displayName": "yolo26x-npu",
"modelName": "weights-1-1.nexa",
"versionCode": 1,
"baseUrl": "https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/yolo26x-npu-mobile/",
"modelUrl": "weights-1-1.nexa"
},
{
"id": "depth-anything-v2-npu",
"displayName": "depth-anything-v2-npu",
"modelName": "weights-1-1.nexa",
"versionCode": 1,
"baseUrl": "https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/depth-anything-v2-npu-mobile/",
"modelUrl": "weights-1-1.nexa"
},
{
"id": "embeddinggemma-300m-npu",
"displayName": "embeddinggemma-300m-npu",
"modelName": "files-1-2.nexa",
"versionCode": 1,
"baseUrl": "https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/embeddinggemma-300m-npu-mobile/",
"modelUrl": "files-1-2.nexa"
},
{
"id": "LFM2-1.2B-GGUF-GGUF",
"displayName": "LFM2-1.2B-GGUF-GGUF",
"modelName": "LFM2-1.2B-Q4_0.gguf",
"type": "chat",
"versionCode": 1,
"pluginIds": 17,
"modelUrl": "https://huggingface.co/LiquidAI/LFM2-1.2B-GGUF/resolve/main/LFM2-1.2B-Q4_0.gguf"
},
{
"id": "Llama-3.2-1B-Instruct-GGUF",
"displayName": "Llama-3.2-1B-Instruct-GGUF",
"modelName": "Llama-3.2-1B-Instruct-Q4_0.gguf",
"type": "chat",
"versionCode": 1,
"pluginIds": 17,
"modelUrl": "https://huggingface.co/bartowski/Llama-3.2-1B-Instruct-GGUF/resolve/main/Llama-3.2-1B-Instruct-Q4_0.gguf"
},
{
"id": "LFM2-24B-A2B-Preview-GGUF",
"displayName": "LFM2-24B-A2B-Preview-GGUF",
"modelName": "LFM2-24B-A2B-Preview-Q4_0.gguf",
"type": "chat",
"versionCode": 1,
"pluginIds": 17,
"modelUrl": "https://huggingface.co/NexaAI/LFM2-24B-A2B-Preview-GGUF/resolve/main/LFM2-24B-A2B-Preview-Q4_0.gguf"
}
]
================================================
FILE: bindings/android/app/src/main/java/com/nexa/demo/ChatAdapter.kt
================================================
// Copyright 2024-2026 Nexa AI, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.nexa.demo
import android.content.Intent
import android.graphics.BitmapFactory
import android.net.Uri
import android.text.method.LinkMovementMethod
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import io.noties.markwon.Markwon
import io.noties.markwon.ext.latex.JLatexMathPlugin
import io.noties.markwon.ext.strikethrough.StrikethroughPlugin
import io.noties.markwon.ext.tables.TablePlugin
import io.noties.markwon.inlineparser.MarkwonInlineParserPlugin
import io.noties.markwon.linkify.LinkifyPlugin
import java.io.File
data class Message(
val content: String,
val type: MessageType,
val images: List<File> = emptyList(),
val audio: List<File> = emptyList()
)
enum class MessageType(val value: Int) {
USER(0),
ASSISTANT(1),
PROFILE(2),
IMAGES(3),
ASSISTANT_IMAGES(4);
companion object {
fun from(value: Int): MessageType =
entries.firstOrNull { it.value == value } ?: PROFILE
}
}
class ChatAdapter(private val messages: List<Message>) :
RecyclerView.Adapter<RecyclerView.ViewHolder>() {
override fun getItemViewType(position: Int): Int {
val message = messages[position]
return message.type.value
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
val inflater = LayoutInflater.from(parent.context)
val type = MessageType.from(viewType)
return when (type) {
MessageType.USER -> UserViewHolder(inflater.inflate(R.layout.item_user_message, parent, false))
MessageType.ASSISTANT -> AiViewHolder(inflater.inflate(R.layout.item_ai_message, parent, false))
MessageType.IMAGES -> ImagesViewHolder(inflater.inflate(R.layout.item_image_message, parent, false))
MessageType.ASSISTANT_IMAGES -> ImagesViewHolder(
inflater.inflate(
R.layout.item_assistant_image_message,
parent,
false
)
)
else -> ProfileViewHolder(inflater.inflate(R.layout.item_profile_message, parent, false))
}
}
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
val message = messages[position]
if (holder is UserViewHolder) holder.bind(message)
if (holder is AiViewHolder) holder.bind(message)
if (holder is ImagesViewHolder) holder.bind(message)
if (holder is ProfileViewHolder) holder.bind(message)
}
override fun getItemCount() = messages.size
class UserViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
private val tvMessage: TextView = itemView.findViewById(R.id.tv_message)
fun bind(message: Message) {
tvMessage.text = message.content
}
}
class AiViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
private val tvMessage: TextView = itemView.findViewById(R.id.tv_message)
private val markwon: Markwon = Markwon.builder(itemView.context)
.usePlugin(StrikethroughPlugin.create())
.usePlugin(TablePlugin.create(itemView.context))
.usePlugin(LinkifyPlugin.create())
.usePlugin(MarkwonInlineParserPlugin.create())
.usePlugin(JLatexMathPlugin.create(tvMessage.textSize) { builder ->
builder.inlinesEnabled(true)
builder.blocksEnabled(true)
})
.build()
fun bind(message: Message) {
markwon.setMarkdown(tvMessage, message.content.trim())
tvMessage.movementMethod = LinkMovementMethod.getInstance()
}
}
class ProfileViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
private val tvMessage: TextView = itemView.findViewById(R.id.tv_message)
fun bind(message: Message) {
tvMessage.text = message.content
}
private fun dpToPx(dp: Int, context: android.content.Context): Int {
return (dp * context.resources.displayMetrics.density).toInt()
}
}
class ImagesViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
private val imageContainer: LinearLayout = itemView.findViewById(R.id.image_container)
fun bind(message: Message) {
val savedImageFiles = message.images
imageContainer.removeAllViews()
val context = itemView.context
for (file in savedImageFiles) {
val itemView = LayoutInflater.from(context)
.inflate(R.layout.item_image_item_message, imageContainer, false)
val ivImage = itemView.findViewById<ImageView>(R.id.iv_image)
val bitmap = BitmapFactory.decodeFile(file.absolutePath)
if (bitmap != null) {
ivImage.setImageBitmap(bitmap)
}
imageContainer.addView(itemView)
}
}
}
}
================================================
FILE: bindings/android/app/src/main/java/com/nexa/demo/FileConfig.kt
================================================
// Copyright 2024-2026 Nexa AI, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.nexa.demo
import android.content.Context
import java.io.File
class FileConfig {
companion object {
val modelsDir = fun(context: Context): File {
return File(context.filesDir, "models").apply { if (!exists()) mkdirs() }
}
}
}
================================================
FILE: bindings/android/app/src/main/java/com/nexa/demo/GenerationConfigSample.kt
================================================
// Copyright 2024-2026 Nexa AI, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.nexa.demo
import com.nexa.sdk.bean.GenerationConfig
import com.nexa.sdk.bean.SamplerConfig
// Configuration sample for generation with defaults compatible with bridge
// maxTokens: 0 = no limit, generates until model's natural stopping point
data class GenerationConfigSample(
var maxTokens: Int = 2048,
var stopWords: List<String>? = null,
var stopCount: Int = 0,
var nPast: Int = 0,
var imagePaths: List<String>? = null,
var imageCount: Int = 0,
var audioPaths: List<String>? = null,
var audioCount: Int = 0,
var systemPrompt: String = ""
) {
// Convert to GenerationConfig with minimal sampler setup for bridge compatibility
// Sampler config uses bridge defaults (no custom parameters applied)
fun toGenerationConfig(grammarString:String? = null): GenerationConfig {
return GenerationConfig(
maxTokens = this.maxTokens,
stopWords = this.stopWords?.toTypedArray(),
stopCount = this.stopCount,
nPast = this.nPast,
//samplerConfig = SamplerConfig(
// grammarString = grammarString
// All other sampler parameters use bridge defaults
// No temperature, topK, topP, penalties applied
//),
imagePaths = this.imagePaths?.toTypedArray(),
imageCount = this.imageCount,
audioPaths = this.audioPaths?.toTypedArray(),
audioCount = this.audioCount
)
}
}
================================================
FILE: bindings/android/app/src/main/java/com/nexa/demo/MainActivity.kt
================================================
// Copyright 2024-2026 Nexa AI, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.nexa.demo
import android.Manifest
import android.app.Activity
import android.content.Context
import android.content.DialogInterface
import android.content.Intent
import android.content.SharedPreferences
import android.content.pm.PackageManager
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.graphics.Canvas
import android.graphics.Color
import android.graphics.Paint
import android.graphics.RectF
import android.net.Uri
import android.os.Bundle
import android.os.Environment
import android.provider.MediaStore
import android.system.Os
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.inputmethod.InputMethodManager
import android.widget.AdapterView
import android.widget.Button
import android.widget.EditText
import android.widget.HorizontalScrollView
import android.widget.ImageButton
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.PopupWindow
import android.widget.ProgressBar
import android.widget.SimpleAdapter
import android.widget.Spinner
import android.widget.TextView
import android.widget.Toast
import androidx.appcompat.app.AlertDialog
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import androidx.core.content.FileProvider
import androidx.fragment.app.FragmentActivity
import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.gyf.immersionbar.ktx.immersionBar
import com.hjq.toast.Toaster
import com.liulishuo.okdownload.DownloadContext
import com.liulishuo.okdownload.DownloadTask
import com.liulishuo.okdownload.OkDownload
import com.liulishuo.okdownload.core.cause.EndCause
import com.liulishuo.okdownload.core.connection.DownloadOkHttp3Connection
import com.liulishuo.okdownload.kotlin.listener.createDownloadContextListener
import com.liulishuo.okdownload.kotlin.listener.createListener1
import com.nexa.demo.bean.DownloadableFile
import com.nexa.demo.bean.DownloadableFileWithFallback
import com.nexa.demo.bean.DownloadState
import com.nexa.demo.bean.ModelData
import com.nexa.demo.bean.downloadableFiles
import com.nexa.demo.bean.downloadableFilesWithFallback
import com.nexa.demo.bean.getNexaManifest
import com.nexa.demo.bean.getNonExistModelFile
import com.nexa.demo.bean.getSupportPluginIds
import com.nexa.demo.bean.isNpuModel
import com.nexa.demo.bean.mmprojTokenFile
import com.nexa.demo.bean.modelDir
import com.nexa.demo.bean.modelFile
import com.nexa.demo.bean.tokenFile
import com.nexa.demo.bean.withFallbackUrls
import com.nexa.demo.utils.ModelFileListingUtil
import com.nexa.demo.databinding.ActivityMainBinding
import com.nexa.demo.databinding.DialogSelectPluginIdBinding
import com.nexa.demo.listeners.CustomDialogInterface
import com.nexa.demo.utils.ExecShell
import com.nexa.demo.utils.ImgUtil
import com.nexa.demo.utils.WavRecorder
import com.nexa.demo.utils.inflate
import com.nexa.sdk.AsrWrapper
import com.nexa.sdk.CvWrapper
import com.nexa.sdk.EmbedderWrapper
import com.nexa.sdk.LlmWrapper
import com.nexa.sdk.NexaSdk
import com.nexa.sdk.RerankerWrapper
import com.nexa.sdk.VlmWrapper
import com.nexa.sdk.bean.AsrCreateInput
import com.nexa.sdk.bean.AsrTranscribeInput
import com.nexa.sdk.bean.CVCapability
import com.nexa.sdk.bean.CVCreateInput
import com.nexa.sdk.bean.CVModelConfig
import com.nexa.sdk.bean.ChatMessage
import com.nexa.sdk.bean.EmbedderCreateInput
import com.nexa.sdk.bean.EmbeddingConfig
import com.nexa.sdk.bean.LlmCreateInput
import com.nexa.sdk.bean.LlmStreamResult
import com.nexa.sdk.bean.ModelConfig
import com.nexa.sdk.bean.RerankConfig
import com.nexa.sdk.bean.RerankerCreateInput
import com.nexa.sdk.bean.VlmChatMessage
import com.nexa.sdk.bean.VlmContent
import com.nexa.sdk.bean.VlmCreateInput
import com.nexa.sdk.bean.DeviceIdValue
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.async
import kotlinx.coroutines.awaitAll
import kotlinx.coroutines.launch
import kotlinx.serialization.json.Json
import okhttp3.OkHttpClient
import okhttp3.Request
import java.io.File
import java.io.FileNotFoundException
import java.io.FileOutputStream
import java.security.SecureRandom
import java.security.cert.CertificateException
import java.security.cert.X509Certificate
import javax.net.ssl.SSLContext
import javax.net.ssl.SSLSession
import javax.net.ssl.SSLSocketFactory
import javax.net.ssl.TrustManager
import javax.net.ssl.X509TrustManager
class MainActivity : FragmentActivity() {
private val binding: ActivityMainBinding by inflate()
private var downloadContext: DownloadContext? = null
private var downloadState = DownloadState.IDLE
private var downloadingModelData: ModelData? = null
private lateinit var spDownloaded: SharedPreferences
private lateinit var llDownloading: LinearLayout
private lateinit var tvDownloadProgress: TextView
private lateinit var pbDownloading: ProgressBar
private lateinit var spModelList: Spinner
private lateinit var btnDownload: Button
private lateinit var btnLoadModel: Button
private lateinit var btnUnloadModel: Button
private lateinit var btnStop: Button
private lateinit var etInput: EditText
private lateinit var btnSend: Button
private lateinit var btnClearHistory: Button
private lateinit var btnAddImage: Button
private lateinit var btnAudioRecord: Button
private lateinit var recyclerView: RecyclerView
private lateinit var adapter: ChatAdapter
private lateinit var bottomPanel: LinearLayout
private lateinit var btnAudioDone: Button
private lateinit var btnAudioCancel: Button
private lateinit var scrollImages: HorizontalScrollView
private lateinit var topScrollContainer: LinearLayout
private lateinit var llLoading: LinearLayout
private lateinit var vTip: View
private lateinit var llmWrapper: LlmWrapper
private lateinit var vlmWrapper: VlmWrapper
var embedderWrapper: EmbedderWrapper? = null
private lateinit var rerankerWrapper: RerankerWrapper
private lateinit var cvWrapper: CvWrapper
private lateinit var asrWrapper: AsrWrapper
private val modelScope = CoroutineScope(Dispatchers.IO)
private val chatList = arrayListOf<ChatMessage>()
private lateinit var llmSystemPrompt: ChatMessage
private val vlmChatList = arrayListOf<VlmChatMessage>()
private lateinit var vlmSystemPrompty: VlmChatMessage
private lateinit var modelList: List<ModelData>
private var selectModelId = ""
// ADD: Track which model type is loaded
private var isLoadLlmModel = false
private var isLoadVlmModel = false
private var isLoadEmbedderModel = false
private var isLoadRerankerModel = false
private var isLoadCVModel = false
private var isLoadAsrModel = false
private var enableThinking = false
private var wavRecorder: WavRecorder? = null
private var audioFile: File? = null
private val savedImageFiles = mutableListOf<File>()
private val messages = arrayListOf<Message>()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
immersionBar {
statusBarColorInt(Color.WHITE)
statusBarDarkFont(true)
}
requestPermissions(arrayOf(Manifest.permission.RECORD_AUDIO), 1002)
okdownload()
initData()
initView()
setListeners()
}
private fun resetLoadState() {
isLoadLlmModel = false
isLoadVlmModel = false
isLoadEmbedderModel = false
isLoadRerankerModel = false
isLoadCVModel = false
isLoadAsrModel = false
}
private fun initView() {
adapter = ChatAdapter(messages)
binding.rvChat.adapter = adapter
llDownloading = findViewById(R.id.ll_downloading)
tvDownloadProgress = findViewById(R.id.tv_download_progress)
pbDownloading = findViewById(R.id.pb_downloading)
spModelList = findViewById(R.id.sp_model_list)
spModelList.adapter = object : SimpleAdapter(this, modelList.map {
val map = mutableMapOf<String, String>()
map["displayName"] = it.displayName
map
}, R.layout.item_model, arrayOf("displayName"), intArrayOf(R.id.tv_model_id)) {
}
spModelList.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
override fun onItemSelected(
parent: AdapterView<*>?, view: View?, position: Int, id: Long
) {
selectModelId = modelList[position].id
messages.clear()
adapter.notifyDataSetChanged()
binding.rvChat.scrollTo(0, 0)
}
override fun onNothingSelected(parent: AdapterView<*>?) {
selectModelId = ""
}
}
btnDownload = findViewById(R.id.btn_download)
btnLoadModel = findViewById(R.id.btn_load_model)
btnUnloadModel = findViewById(R.id.btn_unload_model)
btnStop = findViewById(R.id.btn_stop)
etInput = findViewById(R.id.et_input)
btnAddImage = findViewById(R.id.btn_add_image)
btnAudioRecord = findViewById(R.id.btn_voice)
bottomPanel = findViewById(R.id.bottom_panel)
btnAudioCancel = findViewById(R.id.btn_audio_cancel)
btnAudioDone = findViewById(R.id.btn_audio_done)
btnSend = findViewById(R.id.btn_send)
btnClearHistory = findViewById(R.id.btn_clear_history)
scrollImages = findViewById(R.id.scroll_images)
topScrollContainer = findViewById(R.id.ll_images_container)
llLoading = findViewById(R.id.ll_loading)
vTip = findViewById<View>(R.id.v_tip)
btnAudioCancel.setOnClickListener {
stopRecord(true)
}
btnAudioDone.setOnClickListener {
stopRecord(false)
}
findViewById<Button>(R.id.btn_test).setOnClickListener {
Thread {
val exeFile = File(filesDir, "nexa_test_llm")
val chmodProcess = Runtime.getRuntime().exec("chmod 755 " + exeFile.absolutePath);
chmodProcess.waitFor()
Log.d("nfl", "exeFile exe? ${exeFile.canExecute()}")
Log.d("nfl", "Exe Thread:${Thread.currentThread().name}")
ExecShell().executeCommand(
arrayOf(
// exeFile.absolutePath,
// "--test-suite=\"npu\"", "--success "
"cat",
"/sys/devices/soc0/sku"
// "/data/local/tmp/test_cat.txt"
)
).forEach {
Log.d("nfl", "cmd:$it")
}
}.start()
}
findViewById<View>(R.id.v_tip).setOnClickListener {
Toast.makeText(this, "please unload model first", Toast.LENGTH_SHORT).show()
}
}
private fun parseModelList() {
try {
val baseJson = assets.open("model_list.json").bufferedReader().use { it.readText() }
modelList = Json.decodeFromString<List<ModelData>>(baseJson)
} catch (e: Exception) {
Log.e("nfl", "parseModelList: $e")
}
}
/**
* Step 0. Preparing to download the model file.
*/
private fun initData() {
spDownloaded = getSharedPreferences(SP_DOWNLOADED, MODE_PRIVATE)
// spDownloaded.edit().putBoolean("Qwen3-0.6B-Q8_0", false).commit()
// spDownloaded.edit().putBoolean("Qwen3-0.6B-IQ4_NL", false).commit()
// spDownloaded.edit().putBoolean("LFM2-1.2B-npu", false).commit()
// spDownloaded.edit().putBoolean("embeddinggemma-300m-npu", false).commit()
// spDownloaded.edit().putBoolean("jina-v2-rerank-npu", false).commit()
// spDownloaded.edit().putBoolean("paddleocr-npu", false).commit()
// spDownloaded.edit().putBoolean("parakeet-tdt-0.6b-v3-npu", false).commit()
// spDownloaded.edit().putBoolean("OmniNeural-4B", false).commit()
// spDownloaded.edit().putBoolean("Granite-4.0-h-350M-NPU", false).commit()
// spDownloaded.edit().putBoolean("Granite-4-Micro-NPU", false).commit()
parseModelList()
//
initNexaSdk()
//
val sysPrompt = """\
You are Nays Campaign Manager, an AI assistant responsible for managing customer campaigns and investigating campaign-related issues.
When a customer inquiry comes in, you need to:
1. Analyze the customer's request to understand their campaign needs
2. Check if it's related to campaign limits or issues
3. Use the campaign_investigation function when needed to check campaign status
4. Provide appropriate responses based on the investigation results
Your responsibilities include:
- Investigating campaign performance and limits
- Determining if customers have reached their campaign limits
- Providing helpful messages when limits are reached
- Directing customers to support when limits haven't been reached
- Ensuring smooth campaign operations for all customers
When you receive a query about campaigns, you should:
1. First understand what the customer is asking about
2. If it's campaign-related, use the campaign_investigation tool to check the status
3. Based on the tool's response, provide appropriate guidance
Always be professional, helpful, and focused on resolving campaign-related issues efficiently.
Note: You must use the campaign_investigation function whenever a customer asks about campaign limits, issues, or status.
"""
// It works better with Chinese prompt words.
val sysPrompt2 = "Must reply in markdown format"
// addSystemPrompt(sysPrompt2)
}
/**
* Step 1. initNexaSdk environment
*/
private fun initNexaSdk() {
// Initialize NexaSdk with context
NexaSdk.getInstance().init(this, object : NexaSdk.InitCallback {
override fun onSuccess() {
}
override fun onFailure(reason: String) {
Log.e(TAG, "NexaSdk init failed: $reason")
}
})
val testLocalPath = false
if (testLocalPath) {
// FIXME: Set directory according to terminal format
val pluginNativeLibPath = filesDir.absolutePath
val pluginAdspLibPath = File(filesDir, "npu/htp-files").absolutePath
val pluginLdLibraryPath =
"$pluginNativeLibPath:$pluginNativeLibPath/npu:$pluginAdspLibPath:\$LD_LIBRARY_PATH"
// FIXME: Set directory with flattened .so files
val NEXA_PLUGIN_PATH = pluginNativeLibPath
val LD_LIBRARY_PATH = pluginLdLibraryPath
val ADSP_LIBRARY_PATH = pluginAdspLibPath
Log.d("nfl", "NEXA_PLUGIN_PATH:$NEXA_PLUGIN_PATH")
Log.d("nfl", "LD_LIBRARY_PATH:$LD_LIBRARY_PATH")
Log.d("nfl", "ADSP_LIBRARY_PATH:$ADSP_LIBRARY_PATH")
Os.setenv("NEXA_PLUGIN_PATH", NEXA_PLUGIN_PATH, true)
Os.setenv("LD_LIBRARY_PATH", LD_LIBRARY_PATH, true)
Os.setenv("ADSP_LIBRARY_PATH", ADSP_LIBRARY_PATH, true)
}
}
/**
* Step 2. add system prompt, such as : output markdown style, contains emoji etc.(Options)
*/
private fun addSystemPrompt(sysPrompt: String) {
llmSystemPrompt = ChatMessage("system", sysPrompt)
chatList.add(llmSystemPrompt)
vlmSystemPrompty =
VlmChatMessage(
"system",
listOf(VlmContent("text", sysPrompt))
)
vlmChatList.add(vlmSystemPrompty)
}
private fun getHfToken(model: ModelData, url: String): String? {
// Replace with your own HuggingFace token if needed for private models
return null
}
private fun onLoadModelSuccess(tip: String) {
runOnUiThread {
Toast.makeText(
this@MainActivity, tip, Toast.LENGTH_SHORT
).show()
// change UI
btnAddImage.visibility = View.INVISIBLE
btnAudioRecord.visibility = View.INVISIBLE
if (isLoadVlmModel) {
btnAddImage.visibility = View.VISIBLE
btnAudioRecord.visibility = View.VISIBLE
}
if (isLoadCVModel) {
btnAddImage.visibility = View.VISIBLE
}
if (isLoadAsrModel) {
btnAudioRecord.visibility = View.VISIBLE
}
//
btnUnloadModel.visibility = View.VISIBLE
llLoading.visibility = View.INVISIBLE
//
if (isLoadEmbedderModel || isLoadRerankerModel || isLoadAsrModel || isLoadCVModel) {
btnStop.visibility = View.GONE
} else {
btnStop.visibility = View.VISIBLE
}
}
}
private fun onLoadModelFailed(tip: String) {
runOnUiThread {
vTip.visibility = View.GONE
// Check if files exist locally first
val selectModelData = modelList.firstOrNull { it.id == selectModelId }
val fileName = isModelDownloaded(selectModelData!!)
val filesExist = fileName == null
if (!filesExist) {
Toaster.showLong("The \"$fileName\" file is missing. Please download it first.")
} else {
Toast.makeText(this@MainActivity, tip, Toast.LENGTH_SHORT)
.show()
}
// change UI
btnAddImage.visibility = View.INVISIBLE
btnAudioRecord.visibility = View.INVISIBLE
btnUnloadModel.visibility = View.GONE
llLoading.visibility = View.INVISIBLE
}
}
private fun hasLoadedModel(): Boolean {
return isLoadLlmModel || isLoadVlmModel || isLoadEmbedderModel ||
isLoadRerankerModel || isLoadCVModel || isLoadAsrModel
}
/**
* Helper function to check if model files exist locally
* @return null if all files exist locally. or file's name which is missing.
*/
private fun isModelDownloaded(modelData: ModelData): String? {
val modelDir = modelData.modelDir(this@MainActivity)
val fileName = modelData.getNonExistModelFile(modelDir)
val filesExist = fileName == null
// Sync SharedPreferences with actual file existence
if (filesExist && !spDownloaded.getBoolean(modelData.id, false)) {
Log.d(TAG, "Model files found locally for ${modelData.id}, updating SharedPreferences")
spDownloaded.edit().putBoolean(modelData.id, true).commit()
}
return fileName
}
/**
* Draw bounding boxes on the image for object detection results
*/
private fun drawBoundingBoxes(originalBitmap: Bitmap, results: List<com.nexa.sdk.bean.CVResult>): Bitmap {
val mutableBitmap = originalBitmap.copy(Bitmap.Config.ARGB_8888, true)
val canvas = Canvas(mutableBitmap)
// Prepare paint for bounding boxes
val boxPaint = Paint().apply {
style = Paint.Style.STROKE
strokeWidth = 2f
isAntiAlias = true
}
// Prepare paint for text background
val textBgPaint = Paint().apply {
style = Paint.Style.FILL
isAntiAlias = true
}
// Prepare paint for text
val textPaint = Paint().apply {
color = Color.WHITE
textSize = 20f
isAntiAlias = true
isFakeBoldText = true
}
// Color palette for different classes
val colors = listOf(
Color.rgb(255, 0, 0), // Red
Color.rgb(0, 255, 0), // Green
Color.rgb(0, 0, 255), // Blue
Color.rgb(255, 255, 0), // Yellow
Color.rgb(255, 0, 255), // Magenta
Color.rgb(0, 255, 255), // Cyan
Color.rgb(255, 128, 0), // Orange
Color.rgb(128, 0, 255) // Purple
)
results.forEachIndexed { index, result ->
result.bbox?.let { bbox ->
// bbox already has pixel values (not normalized 0-1)
val x1 = bbox.x
val y1 = bbox.y
val x2 = bbox.x + bbox.width
val y2 = bbox.y + bbox.height
// Select color based on index
val color = colors[index % colors.size]
boxPaint.color = color
textBgPaint.color = color
// Draw bounding box
val rect = RectF(x1, y1, x2, y2)
canvas.drawRect(rect, boxPaint)
// Prepare label text
val label = result.text ?: "object"
val confidence = result.confidence ?: 0.0
val labelText = "$label ${String.format("%.2f", confidence)}"
// Measure text
val textBounds = android.graphics.Rect()
textPaint.getTextBounds(labelText, 0, labelText.length, textBounds)
// Draw text background
val textBgRect = RectF(
x1,
y1 - textBounds.height() - 4f,
x1 + textBounds.width() + 8f,
y1
)
canvas.drawRect(textBgRect, textBgPaint)
// Draw text
canvas.drawText(labelText, x1 + 4f, y1 - 4f, textPaint)
}
}
return mutableBitmap
}
private fun loadModel(selectModelData: ModelData, modelDataPluginId: String, nGpuLayers: Int, deviceId: String? = null) {
modelScope.launch {
resetLoadState()
val nexaManifestBean = selectModelData.getNexaManifest(this@MainActivity)
val pluginId = nexaManifestBean?.PluginId ?: modelDataPluginId
when (nexaManifestBean?.ModelType ?: selectModelData.type) {
"chat", "llm" -> {
val conf = ModelConfig(
nCtx = 1024,
nGpuLayers = nGpuLayers,
enable_thinking = enableThinking,
npu_lib_folder_path = applicationInfo.nativeLibraryDir,
npu_model_folder_path = selectModelData.modelDir(this@MainActivity).absolutePath
)
// Build and initialize LlmWrapper for chat model
LlmWrapper.builder().llmCreateInput(
LlmCreateInput(
model_name = nexaManifestBean?.ModelName ?: "",
model_path = selectModelData.modelFile(this@MainActivity)!!.absolutePath,
tokenizer_path = selectModelData.tokenFile(this@MainActivity)?.absolutePath,
config = conf,
plugin_id = pluginId,
device_id = deviceId ?: DeviceIdValue.NPU.value
)
).build().onSuccess { wrapper ->
isLoadLlmModel = true
llmWrapper = wrapper
onLoadModelSuccess("llm model loaded")
}.onFailure { error ->
onLoadModelFailed(error.message.toString())
}
}
"embedder" -> {
// Handle embedder model loading with NPU paths using EmbedderCreateInput
// embed-gemma
val embedderCreateInput = EmbedderCreateInput(
model_name = nexaManifestBean?.ModelName
?: "", // Model name for NPU plugin
model_path = selectModelData.modelFile(this@MainActivity)!!.absolutePath,
tokenizer_path = selectModelData.tokenFile(this@MainActivity)?.absolutePath,
config = ModelConfig(
npu_lib_folder_path = applicationInfo.nativeLibraryDir,
npu_model_folder_path = selectModelData.modelDir(this@MainActivity).absolutePath,
nGpuLayers = nGpuLayers
),
plugin_id = pluginId,
device_id = DeviceIdValue.CPU.value
)
EmbedderWrapper.builder()
.embedderCreateInput(embedderCreateInput)
.build().onSuccess { wrapper ->
isLoadEmbedderModel = true
embedderWrapper = wrapper
onLoadModelSuccess("embedder model loaded")
}.onFailure { error ->
onLoadModelFailed(error.message.toString())
}
}
"reranker" -> {
// Handle reranker model loading with NPU paths using RerankerCreateInput
// jina-v2-rerank-npu
val rerankerCreateInput = RerankerCreateInput(
model_name = nexaManifestBean?.ModelName
?: "", // Model name for NPU plugin
model_path = selectModelData.modelFile(this@MainActivity)!!.absolutePath,
tokenizer_path = selectModelData.tokenFile(this@MainActivity)?.absolutePath,
config = ModelConfig(
npu_lib_folder_path = applicationInfo.nativeLibraryDir,
npu_model_folder_path = selectModelData.modelDir(this@MainActivity).absolutePath,
nGpuLayers = nGpuLayers
),
plugin_id = pluginId,
device_id = DeviceIdValue.CPU.value
)
RerankerWrapper.builder()
.rerankerCreateInput(rerankerCreateInput)
.build().onSuccess { wrapper ->
isLoadRerankerModel = true
rerankerWrapper = wrapper
onLoadModelSuccess("reranker model loaded")
}.onFailure { error ->
onLoadModelFailed(error.message.toString())
}
}
"cv" -> {
// paddleocr-npu
val cvCreateInput = CVCreateInput(
model_name = nexaManifestBean?.ModelName ?: "",
config = CVModelConfig(
capabilities = CVCapability.OCR,
det_model_path = selectModelData.modelDir(this@MainActivity).absolutePath,
rec_model_path = selectModelData.modelFile(this@MainActivity)!!.absolutePath,
char_dict_path = selectModelData.modelDir(this@MainActivity).absolutePath,
npu_model_folder_path = selectModelData.modelDir(this@MainActivity).absolutePath,
npu_lib_folder_path = applicationInfo.nativeLibraryDir
),
plugin_id = pluginId
)
CvWrapper.builder()
.createInput(cvCreateInput)
.build().onSuccess {
isLoadCVModel = true
cvWrapper = it
onLoadModelSuccess("cv model loaded")
}.onFailure { error ->
onLoadModelFailed(error.message.toString())
}
}
"asr" -> {
// ADD: Handle ASR model loading
// parakeet-tdt-0.6b-v3-npu
val asrCreateInput = AsrCreateInput(
model_name = nexaManifestBean?.ModelName ?: "",
model_path = selectModelData.modelFile(this@MainActivity)!!.absolutePath,
config = ModelConfig(
npu_lib_folder_path = applicationInfo.nativeLibraryDir,
npu_model_folder_path = selectModelData.modelDir(this@MainActivity).absolutePath,
nGpuLayers = nGpuLayers
),
plugin_id = pluginId
)
AsrWrapper.builder()
.asrCreateInput(asrCreateInput)
.build().onSuccess { wrapper ->
isLoadAsrModel = true
asrWrapper = wrapper
onLoadModelSuccess("ASR model loaded")
}.onFailure { error ->
onLoadModelFailed(error.message.toString())
}
}
"multimodal", "vlm" -> {
// VLM model
val isNpuVlm = nexaManifestBean?.PluginId == "npu"
val config = if (isNpuVlm) {
ModelConfig(
nCtx = 2048,
nThreads = 8,
enable_thinking = enableThinking,
npu_lib_folder_path = applicationInfo.nativeLibraryDir,
npu_model_folder_path = selectModelData.modelDir(this@MainActivity).absolutePath
)
} else {
ModelConfig(
nCtx = 1024,
nThreads = 4,
nBatch = 1,
nUBatch = 1,
nGpuLayers = nGpuLayers,
enable_thinking = enableThinking
)
}
val vlmCreateInput = VlmCreateInput(
model_name = nexaManifestBean?.ModelName ?: "",
model_path = selectModelData.modelFile(this@MainActivity)!!.absolutePath,
mmproj_path = selectModelData.mmprojTokenFile(this@MainActivity)?.absolutePath,
config = config,
plugin_id = pluginId,
device_id = "HTP0"
)
VlmWrapper.builder()
.vlmCreateInput(vlmCreateInput)
.build().onSuccess {
isLoadVlmModel = true
vlmWrapper = it
onLoadModelSuccess("vlm model loaded")
}.onFailure { error ->
onLoadModelFailed(error.message.toString())
}
}
else -> {
onLoadModelFailed("model type error")
}
}
}
}
private fun downloadModel(selectModelData: ModelData) {
// Check local files first before SharedPreferences
val fileName = isModelDownloaded(selectModelData)
if (fileName == null || hasLoadedModel()) {
Toast.makeText(this@MainActivity, "model already downloaded", Toast.LENGTH_SHORT)
.show()
} else {
downloadState = DownloadState.DOWNLOADING
downloadingModelData = selectModelData
llDownloading.visibility = View.VISIBLE
tvDownloadProgress.text = "0%"
modelScope.launch {
val selectModelData = modelList.first { it.id == selectModelId }
val unsafeClient = getUnsafeOkHttpClient().build()
// Track URL mapping for fallback: primary URL -> fallback URL
val fallbackUrlMap = mutableMapOf<String, String>()
// Track failed downloads for fallback retry
val failedDownloads = mutableListOf<DownloadableFileWithFallback>()
// For NPU models without explicit files list, fetch file list with fallback support
val filesToDownloadWithFallback: List<DownloadableFileWithFallback> =
if (selectModelData.isNpuModel() &&
selectModelData.files.isNullOrEmpty() &&
!selectModelData.baseUrl.isNullOrEmpty()
) {
Log.d(TAG, "NPU model detected, fetching file list: ${selectModelData.baseUrl}")
// Fetch file list with fallback support
val result = ModelFileListingUtil.listFilesWithFallback(selectModelData.baseUrl!!, unsafeClient)
if (result.files.isEmpty()) {
Log.e(TAG, "Failed to fetch file list for ${selectModelData.id}")
runOnUiThread {
downloadState = DownloadState.IDLE
llDownloading.visibility = View.GONE
Toaster.show("Failed to fetch file list.")
}
return@launch
}
val useHfUrls = result.source == ModelFileListingUtil.FileListResult.Source.HUGGINGFACE
Log.d(TAG, "Found ${result.files.size} files from ${result.source}: ${result.files}")
selectModelData.downloadableFilesWithFallback(
selectModelData.modelDir(this@MainActivity),
result.files,
useHfUrls
)
} else {
// For non-NPU models or models with explicit files, use the original method with fallback
selectModelData.downloadableFiles(selectModelData.modelDir(this@MainActivity))
.withFallbackUrls()
}
// Build fallback URL map
filesToDownloadWithFallback.forEach {
fallbackUrlMap[it.primaryUrl] = it.fallbackUrl
}
// Convert to simple DownloadableFile for initial download attempt
val filesToDownload = filesToDownloadWithFallback.map {
DownloadableFile(it.file, it.primaryUrl)
}
Log.d(TAG, "filesToDownload: $filesToDownload")
if (filesToDownload.isEmpty()) throw IllegalArgumentException("No download URL")
fun getUrlFileSize(client: OkHttpClient, url: String): Long {
val hostname = try {
url.substringAfter("://").substringBefore("/")
} catch (e: Exception) {
"unknown"
}
Log.d(TAG, "Requesting file size: $hostname")
val builder = Request.Builder().url(url).head()
getHfToken(selectModelData, url)?.let {
builder.addHeader("Authorization", "Bearer $it")
}
val request = builder.build()
try {
client.newCall(request).execute().use { resp ->
val size = resp.header("Content-Length")?.toLongOrNull() ?: 0L
Log.d(TAG, "Response: code=${resp.code}, size=$size")
return size
}
} catch (e: java.net.UnknownHostException) {
Log.e(TAG, "DNS resolution failed for $hostname - Check DNS/network")
return 0L
} catch (e: java.net.SocketTimeoutException) {
Log.e(TAG, "Connection timeout to $hostname - Possible firewall/proxy issue")
return 0L
} catch (e: java.net.ConnectException) {
Log.e(TAG, "Connection refused by $hostname - Server unreachable")
return 0L
} catch (e: javax.net.ssl.SSLException) {
Log.e(TAG, "SSL/TLS error to $hostname - ${e.message}")
return 0L
} catch (e: Exception) {
Log.e(TAG, "Network error: ${e.javaClass.simpleName} - ${e.message}")
return 0L
}
}
// Try to get file sizes, with fallback to HF if S3 fails
val fileSizeMap = mutableMapOf<String, Long>()
filesToDownloadWithFallback.forEach { fileWithFallback ->
var size = getUrlFileSize(unsafeClient, fileWithFallback.primaryUrl)
if (size == 0L && fileWithFallback.fallbackUrl != fileWithFallback.primaryUrl) {
Log.w(TAG, "Primary URL failed, trying fallback for size: ${fileWithFallback.file.name}")
size = getUrlFileSize(unsafeClient, fileWithFallback.fallbackUrl)
}
fileSizeMap[fileWithFallback.primaryUrl] = size
}
val totalSizes = filesToDownload.map { fileSizeMap[it.url] ?: 0L }
// Only fail if essential model files (.nexa, .gguf, .bin) have size=0
// Allow size=0 for config files like .json, .md, .txt, .gitattributes
val essentialExtensions = listOf(".nexa", ".gguf", ".bin", ".safetensors")
val essentialFilesWithZeroSize = filesToDownload.filterIndexed { index, file ->
val isEssential = essentialExtensions.any { file.file.name.endsWith(it, ignoreCase = true) }
isEssential && totalSizes[index] == 0L
}
if (essentialFilesWithZeroSize.isNotEmpty()) {
Log.e(TAG, "Essential files with zero size: ${essentialFilesWithZeroSize.map { it.file.name }}")
runOnUiThread {
downloadState = DownloadState.IDLE
llDownloading.visibility = View.GONE
Toaster.show("Download failed - could not get file sizes for essential model files.")
}
return@launch
}
// Filter out non-essential files with size=0 (like config.json that may not exist)
val filesToDownloadFiltered = filesToDownload.filterIndexed { index, _ ->
totalSizes[index] > 0L
}
val filesToDownloadWithFallbackFiltered = filesToDownloadWithFallback.filter { fileWithFallback ->
fileSizeMap[fileWithFallback.primaryUrl]?.let { it > 0L } ?: false
}
if (filesToDownloadFiltered.isEmpty()) {
runOnUiThread {
downloadState = DownloadState.IDLE
llDownloading.visibility = View.GONE
Toaster.show("No files to download.")
}
return@launch
}
Log.d(
TAG,
"Filtered ${filesToDownload.size - filesToDownloadFiltered.size} files with size=0, downloading ${filesToDownloadFiltered.size} files"
)
val alreadyDownloaded = mutableMapOf<String, Long>()
val totalBytes = totalSizes.sum()
Log.d(TAG, "all model size: $totalBytes")
val startTime = System.currentTimeMillis()
var lastProgressTime = 0L
val progressInterval = 500L
fun onProgress(
modelId: String,
percent: Int,
downloaded: Long,
totalBytes: Long,
etaSec: Long,
speedStr: String
) {
runOnUiThread {
if (100 == percent) {
llDownloading.visibility = View.GONE
spDownloaded.edit().putBoolean(selectModelId, true).commit()
Toaster.show("${downloadingModelData?.displayName} downloaded")
} else {
tvDownloadProgress.text = "$percent%"
}
}
}
fun reportProgress(force: Boolean = false) {
val now = System.currentTimeMillis()
if (force || now - lastProgressTime > progressInterval) {
val elapsedMs = now - startTime
val downloaded = alreadyDownloaded.values.sum()
val percent =
if (totalBytes > 0) ((downloaded * 100) / totalBytes).toInt() else 0
val speedAvg =
if (elapsedMs > 0) downloaded / (elapsedMs / 1000.0) else 0.0
val etaSec =
if (speedAvg > 0) ((totalBytes - downloaded) / speedAvg).toLong() else -1L
val speedStr = if (speedAvg > 1024 * 1024) {
String.format("%.2f MB/s", speedAvg / (1024 * 1024))
} else {
String.format("%.1f KB/s", speedAvg / 1024)
}
onProgress(selectModelId, percent, downloaded, totalBytes, etaSec, speedStr)
lastProgressTime = now
}
}
// Function to start download for a list of files
fun startDownload(
downloadFiles: List<DownloadableFile>,
isFallbackAttempt: Boolean = false
) {
if (downloadFiles.isEmpty()) {
if (failedDownloads.isEmpty()) {
// All downloads complete
downloadState = DownloadState.IDLE
reportProgress(force = true)
onProgress(selectModelId, 100, totalBytes, totalBytes, 0, "0 KB/s")
} else {
runOnUiThread {
downloadState = DownloadState.IDLE
llDownloading.visibility = View.GONE
Toaster.show("Download failed for some files.")
}
}
return
}
val queueSet = DownloadContext.QueueSet()
.setParentPathFile(downloadFiles[0].file.parentFile)
.setMinIntervalMillisCallbackProcess(300)
val builder = queueSet.commit()
downloadFiles.forEach { item ->
val taskBuilder = DownloadTask.Builder(item.url, item.file)
getHfToken(selectModelData, item.url)?.let {
taskBuilder.addHeader("Authorization", "Bearer $it")
}
val task = taskBuilder.build()
task.info?.let {
alreadyDownloaded[it.url] = it.totalOffset
}
builder.bindSetTask(task)
}
val totalCount = filesToDownloadFiltered.size
var currentCount = filesToDownloadFiltered.size - downloadFiles.size
val pendingFallbacks = mutableListOf<DownloadableFile>()
downloadContext = builder.setListener(createDownloadContextListener {}).build()
downloadContext?.start(
createListener1(taskStart = { task, _ ->
Log.d(TAG, "download task ${task.id} Start${if (isFallbackAttempt) " (fallback)" else ""}")
}, retry = { task, _ ->
Log.d(TAG, "download task ${task.id} retry")
}, connected = { task, _, _, _ ->
Log.d(TAG, "download task ${task.id} connected")
}, progress = { task, currentOffset, totalLength ->
Log.d(TAG, "download task ${task.id} progress $currentOffset $totalLength")
alreadyDownloaded[task.url] = currentOffset
reportProgress(true)
}) { task, cause, exception, _ ->
when (cause) {
EndCause.CANCELED -> {
// do nothing
}
EndCause.COMPLETED -> {
Log.d(TAG, "download task ${task.id} end")
currentCount += 1
Log.d(
TAG,
"download task process currentCount:$currentCount, totalCount:$totalCount"
)
if (currentCount >= totalCount) {
downloadState = DownloadState.IDLE
reportProgress(force = true)
onProgress(selectModelId, 100, totalBytes, totalBytes, 0, "0 KB/s")
}
}
else -> {
Log.e(TAG, "download task ${task.id} error: $cause, ${exception?.message}")
// Try fallback URL if available and not already a fallback attempt
if (!isFallbackAttempt) {
val fallbackUrl = fallbackUrlMap[task.url]
if (fallbackUrl != null && fallbackUrl != task.url && task.file != null) {
Log.w(TAG, "Primary download failed, queuing fallback: ${task.file?.name}")
pendingFallbacks.add(DownloadableFile(task.file!!, fallbackUrl))
} else {
val failedFile =
filesToDownloadWithFallback.find { it.primaryUrl == task.url }
if (failedFile != null) {
failedDownloads.add(failedFile)
}
}
} else {
val failedFile = filesToDownloadWithFallback.find {
it.primaryUrl == task.url || it.fallbackUrl == task.url
}
if (failedFile != null) {
failedDownloads.add(failedFile)
}
}
currentCount += 1
if (currentCount >= totalCount && pendingFallbacks.isEmpty()) {
if (failedDownloads.isEmpty()) {
downloadState = DownloadState.IDLE
reportProgress(force = true)
onProgress(selectModelId, 100, totalBytes, totalBytes, 0, "0 KB/s")
} else {
runOnUiThread {
downloadState = DownloadState.IDLE
llDownloading.visibility = View.GONE
Toaster.show("Download failed for ${failedDownloads.size} file(s).")
}
}
} else if (pendingFallbacks.isNotEmpty()) {
Log.d(TAG, "Starting ${pendingFallbacks.size} fallback downloads")
modelScope.launch {
startDownload(pendingFallbacks.toList(), isFallbackAttempt = true)
}
pendingFallbacks.clear()
}
}
}
}, true
)
}
// Start initial download with primary URLs
startDownload(filesToDownloadFiltered)
}
}
}
private fun setListeners() {
btnAddImage.setOnClickListener {
openGallery()
}
btnAudioRecord.setOnClickListener {
startRecord()
}
btnClearHistory.setOnClickListener {
clearHistory()
}
/**
* Step 3. download model
*/
binding.btnCancelDownload.setOnClickListener {
downloadContext?.stop()
tvDownloadProgress.text = "0%"
downloadingModelData?.downloadableFiles(downloadingModelData!!.modelDir(this))
?.forEach {
it.file.delete()
}
binding.btnDismissDownload.performClick()
}
binding.btnRetryDownload.setOnClickListener {
downloadContext?.stop()
downloadState = DownloadState.IDLE
downloadModel(downloadingModelData!!)
}
binding.btnDismissDownload.setOnClickListener {
binding.llDownloading.visibility = View.GONE
}
btnDownload.setOnClickListener {
if (downloadState == DownloadState.DOWNLOADING) {
if (downloadingModelData?.id == selectModelId) {
binding.llDownloading.visibility = View.VISIBLE
} else {
Toaster.show("${downloadingModelData?.displayName} is currently downloading.")
}
return@setOnClickListener
}
val selectModelData = modelList.first { it.id == selectModelId }
downloadModel(selectModelData)
}
/**
* Step 4. load model
*/
btnLoadModel.setOnClickListener {
val selectModelData = modelList.first { it.id == selectModelId }
if (selectModelData == null) {
Toast.makeText(this@MainActivity, "model not selected", Toast.LENGTH_SHORT).show()
return@setOnClickListener
}
Log.d(TAG, "current select model data:$selectModelData")
if (hasLoadedModel()) {
Toast.makeText(this@MainActivity, "please unload first", Toast.LENGTH_SHORT).show()
return@setOnClickListener
}
// Check if model files exist locally before attempting to load
val fileName = isModelDownloaded(selectModelData)
if (fileName != null) {
Toaster.showLong("The \"$fileName\" file is missing. Please download it first.")
return@setOnClickListener
}
vTip.visibility = View.VISIBLE
llLoading.visibility = View.VISIBLE
val supportPluginIds = selectModelData.getSupportPluginIds()
Log.d(TAG, "support plugin_id:$supportPluginIds")
var modelDataPluginId = "cpu_gpu"
var nGpuLayers = 0
if (supportPluginIds.size > 1) {
val dialogBinding = DialogSelectPluginIdBinding.inflate(layoutInflater)
val isGgufLlmModel = !selectModelData.isNpuModel() &&
(selectModelData.type == "chat" || selectModelData.type == "llm")
supportPluginIds.forEach {
when (it) {
"cpu" -> {
dialogBinding.rbCpu.visibility = View.VISIBLE
dialogBinding.rbCpu.isChecked = true
}
"gpu" -> {
dialogBinding.rbGpu.visibility = View.VISIBLE
}
"npu" -> {
dialogBinding.rbNpu.visibility = View.VISIBLE
dialogBinding.rbNpu.isChecked = true
}
}
}
if (isGgufLlmModel) {
dialogBinding.rbNpu.visibility = View.VISIBLE
}
dialogBinding.rgSelectPluginId.setOnCheckedChangeListener { group, checkedId ->
dialogBinding.llGpuLayers.visibility =
if (checkedId == R.id.rb_gpu) View.VISIBLE else View.GONE
}
val dialogOnClickListener = object : CustomDialogInterface.OnClickListener() {
override fun onClick(
dialog: DialogInterface?,
which: Int
) {
nGpuLayers = 0
var ggufLlmDeviceId: String? = null
val checkedId = dialogBinding.rgSelectPluginId.checkedRadioButtonId
if (checkedId == R.id.rb_gpu) {
if (dialogBinding.llGpuLayers.visibility == View.VISIBLE) {
nGpuLayers = dialogBinding.etGpuLayers.text.toString().toInt()
if (nGpuLayers == 0) {
Toast.makeText(
this@MainActivity,
"nGpuLayers min value is 1",
Toast.LENGTH_SHORT
).show()
return
}
}
ggufLlmDeviceId = DeviceIdValue.GPU.value
} else if (checkedId == R.id.rb_npu && isGgufLlmModel) {
nGpuLayers = 999
ggufLlmDeviceId = DeviceIdValue.NPU.value
}
when (which) {
DialogInterface.BUTTON_POSITIVE -> {
dialog?.dismiss()
loadModel(selectModelData, modelDataPluginId, nGpuLayers, ggufLlmDeviceId)
}
DialogInterface.BUTTON_NEGATIVE -> {
llLoading.visibility = View.INVISIBLE
vTip.visibility = View.GONE
}
}
}
}
val alertDialog = AlertDialog.Builder(this).setView(dialogBinding.root)
.setNegativeButton("cancel", dialogOnClickListener)
.setPositiveButton("sure", dialogOnClickListener)
.setCancelable(false)
.create()
alertDialog.show()
dialogOnClickListener.resetPositiveButton(alertDialog)
} else {
if ("npu" == supportPluginIds[0]) {
modelDataPluginId = "npu"
}
loadModel(selectModelData, modelDataPluginId, nGpuLayers)
}
}
/**
* Step 5. send message
*/
btnSend.setOnClickListener {
if (!hasLoadedModel()) {
Toast.makeText(this@MainActivity, "please load model first", Toast.LENGTH_SHORT)
.show()
return@setOnClickListener
}
if (savedImageFiles.isNotEmpty()) {
messages.add(Message("", MessageType.IMAGES, savedImageFiles.map { it }))
reloadRecycleView()
}
val inputString = etInput.text.trim().toString()
etInput.setText("")
etInput.clearFocus()
val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
imm.hideSoftInputFromWindow(etInput.windowToken, 0)
if (inputString.isNotEmpty()) {
messages.add(Message(inputString, MessageType.USER))
reloadRecycleView()
}
val supportFunctionCall = false
var tools: String? = null
var grammarString: String? = null
if (supportFunctionCall) {
// if this model support 'function call'
tools =
"[{\"type\":\"function\",\"function\":{\"name\": \"campaign_investigation\",\"description\": \"Check campaign limits and determine appropriate action. If customer has reached limit, return a message (hardcoded or generated by model). If limit not reached, contact support.\",\"parameters\": {\"type\": \"object\", \"properties\":{\"campaign_name\":{\"type\": \"string\",\"description\": \"The name of the campaign to investigate\"}}, \"required\":[\"campaign_name\"]}}}]"
grammarString = """
root ::= "<tool_call>" space object "</tool_call>" space
object ::= "{" space campaign-name-kv "}" space
campaign-name-kv ::= "\"campaign_name\"" space ":" space string
string ::= "\"" char* "\"" space
char ::= [^"\\\x7F\x00-\x1F] | [\\] (["\\bfnrt] | "u" hex hex hex hex)
hex ::= [0-9a-fA-F]
space ::= | " " | "\n" | "\r" | "\t"
"""
}
if (!hasLoadedModel()) {
Toast.makeText(this@MainActivity, "model not loaded", Toast.LENGTH_SHORT).show()
return@setOnClickListener
}
modelScope.launch {
val selectModelData = modelList.first { it.id == selectModelId }
val isNpu = selectModelData.getNexaManifest(this@MainActivity)?.PluginId == "npu"
Log.d(TAG, "isNpu: $isNpu")
val sb = StringBuilder()
if (isLoadCVModel) {
// FIXME: Temporarily select the last image
if (savedImageFiles.isEmpty()) {
runOnUiThread {
Toast.makeText(
this@MainActivity,
"Please select one picture.",
Toast.LENGTH_SHORT
).show()
}
return@launch
}
val imagePath = savedImageFiles.last().absolutePath
runOnUiThread {
messages.add(Message("", MessageType.IMAGES, savedImageFiles))
reloadRecycleView()
clearImages()
}
cvWrapper.infer(imagePath).onSuccess { results ->
Log.d("nfl", "infer result:$results")
runOnUiThread {
val outputImageFiles = results.flatMap { r ->
r.image_paths?.map { File(it) }?.filter { it.exists() } ?: emptyList()
}
val isObjectDetection = results.firstOrNull()?.bbox != null
Log.d("nfl", "outputImageFiles: ${outputImageFiles.size}, isObjectDetection: $isObjectDetection, results count: ${results.size}")
when {
outputImageFiles.isNotEmpty() -> {
messages.add(Message("", MessageType.ASSISTANT_IMAGES, outputImageFiles))
}
isObjectDetection -> {
try {
val originalBitmap = BitmapFactory.decodeFile(imagePath)
Log.d("nfl", "Loaded bitmap: $originalBitmap")
if (originalBitmap == null) {
messages.add(Message("Failed to load image: $imagePath", MessageType.PROFILE))
reloadRecycleView()
return@runOnUiThread
}
val resultBitmap = drawBoundingBoxes(originalBitmap, results)
Log.d("nfl", "Drew bounding boxes: $resultBitmap")
val resultFile = File(filesDir, "detection_result_${System.currentTimeMillis()}.jpg")
resultFile.outputStream().use { out ->
resultBitmap.compress(Bitmap.CompressFormat.JPEG, 95, out)
}
Log.d("nfl", "Saved detection result to: ${resultFile.absolutePath}")
messages.add(Message("", MessageType.ASSISTANT_IMAGES, listOf(resultFile)))
val summary = results.mapIndexed { idx, result ->
val label = result.text ?: "object"
val conf = String.format("%.2f", result.confidence ?: 0.0)
"${idx + 1}. $label ($conf)"
}.joinToString("\n")
messages.add(Message("Detected ${results.size} objects:\n$summary", MessageType.ASSISTANT))
} catch (e: Exception) {
Log.e("nfl", "Error drawing bounding boxes", e)
messages.add(Message("Error processing detection: ${e.message}", MessageType.PROFILE))
}
}
else -> {
Log.d("nfl", "Processing as OCR, results: $results")
val content = results.map { result ->
"[${result.confidence}] ${result.text}"
}.joinToString(separator = "\n")
messages.add(Message(content, MessageType.ASSISTANT))
}
}
reloadRecycleView()
}
}.onFailure { error ->
runOnUiThread {
messages.add(Message(error.toString(), MessageType.PROFILE))
reloadRecycleView()
}
Log.d("nfl", "infer result error:$error")
}
} else if (isLoadAsrModel) {
if (audioFile == null) {
runOnUiThread {
Toast.makeText(this@MainActivity, "no audio file", Toast.LENGTH_SHORT)
.show()
}
} else {
// val audioFilePath = audioFile!!.absolutePath
val audioFilePath = "/sdcard/Download/assets/OSR_us_000_0010_16k.wav"
asrWrapper.transcribe(
AsrTranscribeInput(
audioFilePath, // Use hardcoded path instead of inputString
"en", // Language code
null // Optional timestamps
)
).onSuccess { transcription ->
runOnUiThread {
messages.add(
Message(
transcription.result.transcript ?: "",
MessageType.ASSISTANT
)
)
reloadRecycleView()
}
}.onFailure { error ->
runOnUiThread {
messages.add(
Message(
"Error: ${error.message}",
MessageType.PROFILE
)
)
reloadRecycleView()
}
}
}
} else if (isLoadEmbedderModel) {
// ADD: Handle embedder inference
// Input format: single text or multiple texts separated by "|"
val texts = inputString.split("|").map { it.trim() }.toTypedArray()
embedderWrapper!!.embed(texts, EmbeddingConfig()).onSuccess { embedResult ->
runOnUiThread {
val result = StringBuilder()
val flatEmbeddings = embedResult.embeddings
val embeddingDim = flatEmbeddings.size / texts.size
texts.forEachIndexed { idx, text ->
val start = idx * embeddingDim
val end = start + embeddingDim
val embedding = flatEmbeddings.sliceArray(start until end)
// Calculate mean and variance
val mean = embedding.average()
val variance = embedding.map { (it - mean) * (it - mean) }.average()
result.append("Text ${idx + 1}: \"$text\"\n")
result.append("Embedding dimension: $embeddingDim\n")
result.append("Mean: ${"%.4f".format(mean)}\n")
result.append("Variance: ${"%.4f".format(variance)}\n")
result.append("First 5 values: [")
result.append(
embedding.take(5).joinToString(", ") { "%.4f".format(it) })
result.append("...]\n\n")
}
messages.add(Message(result.toString(), MessageType.ASSISTANT))
reloadRecycleView()
}
}.onFailure { error ->
runOnUiThread {
messages.add(Message("Error: ${error.message}", MessageType.PROFILE))
reloadRecycleView()
}
}
} else if (isLoadRerankerModel) {
// Reranker input format: "query\ndoc1\ndoc2\ndoc3..."
// First line is query, remaining lines are documents
val query = inputString.split("\n")[0] // Get first line as query
val documents =
inputString.split("\n").drop(1).toTypedArray() // Get rest as docs
rerankerWrapper.rerank(query, documents, RerankConfig())
.onSuccess { rerankerResult ->
runOnUiThread {
val result = StringBuilder()
result.append("Rerank Results:\n")
// Sort by score descending to show best matches first
rerankerResult.scores?.withIndex()?.sortedByDescending { it.value }
?.forEach { (idx, score) ->
result.append("${idx + 1}. Score: ${"%.4f".format(score)}\n")
result.append(" ${documents[idx]}\n\n")
}
messages.add(Message(result.toString(), MessageType.ASSISTANT))
reloadRecycleView()
}
}.onFailure { error ->
runOnUiThread {
"Error: ${error.message}".also {
messages.add(Message(it, MessageType.PROFILE))
reloadRecycleView()
}
}
}
} else if (isLoadVlmModel) {
val contents = savedImageFiles.map {
VlmContent("image", it.absolutePath)
}.toMutableList()
audioFile?.let {
contents.add(VlmContent("audio", it.absolutePath))
}
contents.add(VlmContent("text", inputString))
audioFile = null
clearImages()
val sendMsg = VlmChatMessage(role = "user", contents = contents)
// VlmContentTransfer(
// this@MainActivity, VlmContent(
// "image", inputString
// )
// ).forUrl()
// vlmChatList.clear()
vlmChatList.add(sendMsg)
Log.d(TAG, "before apply chat template:$vlmChatList")
vlmWrapper.applyChatTemplate(vlmChatList.toTypedArray(), tools, enableThinking)
.onSuccess { result ->
Log.d(TAG, "vlm chat template:${result.formattedText}")
val baseConfig =
GenerationConfigSample().toGenerationConfig(grammarString)
val configWithMedia = vlmWrapper.injectMediaPathsToConfig(
vlmChatList.toTypedArray(),
baseConfig
)
Log.d(TAG, "Config has ${configWithMedia.imageCount} images")
vlmWrapper.generateStreamFlow(
if (isNpu || true) inputString else result.formattedText,
configWithMedia // Use the updated config with media paths
).collect { handleResult(sb, it) }
}.onFailure {
runOnUiThread {
Toast.makeText(
this@MainActivity, it.message, Toast.LENGTH_SHORT
).show()
}
}
} else {
chatList.add(ChatMessage(role = "user", inputString))
// Apply chat template and generate
llmWrapper.applyChatTemplate(
chatList.toTypedArray(),
tools,
enableThinking
).onSuccess { templateOutput ->
Log.d(TAG, "chat template:${templateOutput.formattedText}")
llmWrapper.generateStreamFlow(
templateOutput.formattedText,
GenerationConfigSample().toGenerationConfig(grammarString)
).collect { streamResult ->
handleResult(sb, streamResult)
}
}.onFailure { error ->
runOnUiThread {
Toast.makeText(
this@MainActivity, error.message, Toast.LENGTH_SHORT
).show()
}
}
}
clearImages()
}
}
/**
* Step 6. others
*/
btnUnloadModel.setOnClickListener {
if (!hasLoadedModel()) {
Toast.makeText(this@MainActivity, "model not loaded", Toast.LENGTH_SHORT).show()
return@setOnClickListener
}
// Unload model and cleanup
val handleUnloadResult = fun(result: Int) {
resetLoadState()
runOnUiThread {
vTip.visibility = View.GONE
btnUnloadModel.visibility = View.GONE
btnStop.visibility = View.GONE
btnAddImage.visibility = View.INVISIBLE
btnAudioRecord.visibility = View.INVISIBLE
Toast.makeText(
this@MainActivity, if (result == 0) {
"unload success"
} else {
"unload failed and error code: $result"
}, Toast.LENGTH_SHORT
).show()
}
}
modelScope.launch {
if (isLoadVlmModel) {
vlmWrapper.stopStream()
vlmWrapper.destroy()
vlmChatList.clear()
// TODO:
handleUnloadResult(0)
} else if (isLoadEmbedderModel) {
// ADD: Unload embedder
embedderWrapper!!.destroy()
handleUnloadResult(0)
} else if (isLoadRerankerModel) {
// ADD: Unload reranker
handleUnloadResult(rerankerWrapper.destroy())
} else if (isLoadCVModel) {
// ADD: Unload CV model
cvWrapper.destroy()
// TODO:
handleUnloadResult(0)
} else if (isLoadAsrModel) {
// ADD: Unload ASR model
asrWrapper.destroy()
// TODO:
handleUnloadResult(0)
} else if (isLoadLlmModel) {
llmWrapper.stopStream()
llmWrapper.destroy()
chatList.clear()
// TODO:
handleUnloadResult(0)
} else {
handleUnloadResult(0)
}
}
}
btnStop.setOnClickListener {
if (!hasLoadedModel()) {
Toast.makeText(
this@MainActivity,
"model not loaded",
Toast.LENGTH_SHORT
).show()
return@setOnClickListener
}
// MODIFY: Stop button only works for LLM/VLM (not embedder/reranker)
if (isLoadEmbedderModel || isLoadRerankerModel || isLoadAsrModel || isLoadCVModel) {
Toast.makeText(
this@MainActivity,
"Stop not applicable for embedder/reranker/asr/cv",
Toast.LENGTH_SHORT
).show()
return@setOnClickListener
}
// Stop streaming
modelScope.launch {
if (isLoadVlmModel) {
vlmWrapper.stopStream()
} else if (isLoadLlmModel) {
llmWrapper.stopStream()
}
}
}
}
fun handleResult(sb: StringBuilder, streamResult: LlmStreamResult) {
when (streamResult) {
is LlmStreamResult.Token -> {
runOnUiThread {
sb.append(streamResult.text)
Message(sb.toString(), MessageType.ASSISTANT).let { lastMsg ->
val size = messages.size
messages[size - 1].let { msg ->
if (msg.type != MessageType.ASSISTANT) {
messages.add(lastMsg)
} else {
messages[size - 1] = lastMsg
}
}
}
adapter.notifyDataSetChanged()
}
Log.d(TAG, "Token: ${streamResult.text}")
}
is LlmStreamResult.Completed -> {
if (isLoadVlmModel) {
vlmChatList.add(
VlmChatMessage(
"assistant",
listOf(VlmContent("text", sb.toString()))
)
)
} else {
chatList.add(ChatMessage("assistant", sb.toString()))
}
runOnUiThread {
var content = sb.toString()
val size = messages.size
messages[size - 1] = Message(content, MessageType.ASSISTANT)
val ttft = String.format(null, "%.2f", streamResult.profile.ttftMs)
val promptTokens = streamResult.profile.promptTokens
val prefillSpeed =
String.format(null, "%.2f", streamResult.profile.prefillSpeed)
val generatedTokens = streamResult.profile.generatedTokens
val decodingSpeed =
String.format(null, "%.2f", streamResult.profile.decodingSpeed)
val profileData =
"TTFT: $ttft ms; Prompt Tokens: $promptTokens; \nPrefilling Speed: $prefillSpeed tok/s\nGenerated Tokens: $generatedTokens; Decoding Speed: $decodingSpeed tok/s"
messages.add(
Message(
profileData,
MessageType.PROFILE
)
)
reloadRecycleView()
}
Log.d(TAG, "Completed: ${streamResult.profile}")
}
is LlmStreamResult.Error -> {
runOnUiThread {
val content =
"your conversation is out of model’s context length, please start a new conversation or click clear button"
messages.add(Message(content, MessageType.PROFILE))
reloadRecycleView()
}
Log.d(TAG, "Error: $streamResult")
}
}
}
private fun okdownload() {
val okDownloadBuilder = OkDownload.Builder(this)
val factory = DownloadOkHttp3Connection.Factory()
factory.setBuilder(getUnsafeOkHttpClient())
okDownloadBuilder.connectionFactory(factory)
try {
OkDownload.setSingletonInstance(okDownloadBuilder.build())
} catch (e: java.lang.Exception) {
Log.e("download", "download init failed")
}
}
private fun getUnsafeOkHttpClient(): OkHttpClient.Builder {
try {
val x509m: X509TrustManager = object : X509TrustManager {
override fun getAcceptedIssuers(): Array<X509Certificate?>? {
//Note: Cannot return null here, otherwise it will throw an error
val x509Certificates = arrayOfNulls<X509Certificate>(0)
return x509Certificates
}
@Throws(CertificateException::class)
override fun checkServerTrusted(
chain: Array<X509Certificate?>?, authType: String?
) {
// Do not throw exception to trust all server certificates
}
@Throws(CertificateException::class)
override fun checkClientTrusted(
chain: Array<X509Certificate?>?, authType: String?
) {
// Default trust mechanism
}
}
// Create a TrustManager that trusts all certificates
val trustAllCerts = arrayOf<TrustManager>(x509m)
// Initialize SSLContext
val sslContext = SSLContext.getInstance("SSL")
sslContext.init(null, trustAllCerts, SecureRandom())
// Create SSLSocketFactory
val sslSocketFactory: SSLSocketFactory = sslContext.getSocketFactory()
// Build OkHttpClient
return OkHttpClient.Builder().sslSocketFactory(
sslSocketFactory, (trustAllCerts[0] as X509TrustManager?)!!
).hostnameVerifier { hostname: String?, session: SSLSession? -> true }
} catch (e: Exception) {
throw RuntimeException(e)
}
}
private fun openGallery() {
val intent = Intent(Intent.ACTION_PICK, null)
intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*")
startActivityForResult(intent, 1)
}
override fun onRequestPermissionsResult(
requestCode: Int,
permissions: Array<out String>,
grantResults: IntArray
) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults)
if (requestCode == 0) {
if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
openGallery()
} else {
Toast.makeText(this, "Not allow", Toast.LENGTH_SHORT).show()
}
} else if (requestCode == 2001) {
if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
openCamera()
} else {
Toast.makeText(this, "Camera not allow", Toast.LENGTH_SHORT).show()
}
}
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
var bitmap: Bitmap? = null
if (requestCode == 1) {
if (resultCode == Activity.RESULT_OK && data != null) {
val inputStream = contentResolver.openInputStream(data.data!!)
bitmap = BitmapFactory.decodeStream(inputStream)
}
} else if (requestCode == 1001 && resultCode == Activity.RESULT_OK) {
photoFile?.let {
bitmap = BitmapFactory.decodeFile(it.absolutePath)
}
}
bitmap?.let {
try {
val file = File(filesDir, "chat_${System.currentTimeMillis()}.jpg")
val success = saveBitmapToFile(it, file)
if (success) {
Log.d(TAG, "Save success:${file.absolutePath}")
savedImageFiles.add(file)
refreshTopScrollContainer()
} else {
Toast.makeText(this, "Save Image failed", Toast.LENGTH_SHORT).show()
}
} catch (e: FileNotFoundException) {
e.printStackTrace()
}
}
}
private fun saveBitmapToFile(bitmap: Bitmap, file: File): Boolean {
return try {
val tempDir = File(this.filesDir, "tmp").apply { if (!exists()) mkdirs() }
val tempFile = File(
tempDir,
"tmp_${System.currentTimeMillis()}.jpg"
)
FileOutputStream(tempFile).use { out ->
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, out)
}
val outFile = File(
tempDir,
"out_${System.currentTimeMillis()}.jpg"
)
ImgUtil.squareCrop(
ImgUtil.downscaleAndSave(
imageFile = tempFile,
outFile = outFile,
maxSize = 448,
format = Bitmap.CompressFormat.JPEG,
quality = 90
), file, 448
)
true
} catch (e: Exception) {
e.printStackTrace()
false
}
}
private fun stopRecord(cancel: Boolean) {
wavRecorder?.stopRecording()
wavRecorder = null
bottomPanel.visibility = View.GONE
if (cancel) {
audioFile = null
}
refreshTopScrollContainer()
}
private fun startRecord() {
bottomPanel.visibility = View.VISIBLE
val file = File(filesDir, "audio")
if (!file.exists()) {
file.mkdirs()
}
audioFile =
File(file, "audio_${System.currentTimeMillis()}.wav")
Log.d(TAG, "audioFile: ${audioFile!!.absolutePath}")
wavRecorder = WavRecorder()
wavRecorder?.startRecording(audioFile!!)
}
private fun clearHistory() {
if (isLoadLlmModel) {
chatList.clear()
modelScope.launch {
llmWrapper.reset()
}
}
if (isLoadVlmModel) {
vlmChatList.clear()
modelScope.launch {
vlmWrapper.reset()
}
}
messages.clear()
audioFile = null
clearImages()
reloadRecycleView()
}
private var popupWindow: PopupWindow? = null
private fun showPopupMenu(anchorView: View) {
if (popupWindow?.isShowing == true) {
popupWindow?.dismiss()
return
}
val popupView = LayoutInflater.from(this).inflate(R.layout.menu_layout, null)
popupWindow = PopupWindow(
popupView,
anchorView.width * 2,
android.view.ViewGroup.LayoutParams.WRAP_CONTENT,
true
)
popupWindow?.isOutsideTouchable = true
popupWindow?.elevation = 10f
val btnCamera = popupView.findViewById<Button>(R.id.btn_camera)
val btnPhoto = popupView.findViewById<Button>(R.id.btn_photo)
btnCamera.setOnClickListener {
popupWindow?.dismiss()
checkAndOpenCamera()
}
btnPhoto.setOnClickListener {
popupWindow?.dismiss()
openGallery()
}
popupView.measure(
View.MeasureSpec.UNSPECIFIED,
View.MeasureSpec.UNSPECIFIED
)
val popupHeight = popupView.measuredHeight
popupWindow?.showAsDropDown(anchorView, 0, -anchorView.height - popupHeight)
}
private var photoUri: Uri? = null
private var photoFile: File? = null
private fun checkAndOpenCamera() {
if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA)
!= PackageManager.PERMISSION_GRANTED
) {
ActivityCompat.requestPermissions(
this,
arrayOf(Manifest.permission.CAMERA),
2001
)
} else {
openCamera()
}
}
private fun openCamera() {
val intent = Intent(MediaStore.ACTION_IMAGE_CAPTURE)
photoFile = File(
getExternalFilesDir(Environment.DIRECTORY_PICTURES),
"photo_${System.currentTimeMillis()}.jpg"
)
photoUri = FileProvider.getUriForFile(
this,
"${applicationContext.packageName}.fileprovider",
photoFile!!
)
intent.putExtra(MediaStore.EXTRA_OUTPUT, photoUri)
intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION)
startActivityForResult(intent, 1001)
}
private fun clearImages() {
savedImageFiles.clear()
refreshTopScrollContainer()
}
private fun refreshTopScrollContainer() {
runOnUiThread {
topScrollContainer.removeAllViews()
if (savedImageFiles.isEmpty() && audioFile == null) {
scrollImages.visibility = View.GONE
return@runOnUiThread
}
scrollImages.visibility = View.VISIBLE
for (file in savedImageFiles) {
val itemView = LayoutInflater.from(this)
.inflate(R.layout.item_image_scroll, topScrollContainer, false)
val ivImage = itemView.findViewById<ImageView>(R.id.iv_image)
val btnRemove = itemView.findViewById<ImageButton>(R.id.btn_remove)
ivImage.setImageURI(Uri.fromFile(file))
btnRemove.setOnClickListener {
savedImageFiles.remove(file)
refreshTopScrollContainer()
}
topScrollContainer.addView(itemView)
}
if (audioFile != null) {
val audioView = LayoutInflater.from(this)
.inflate(R.layout.item_audio_scroll, topScrollContainer, false)
val audioName = audioView.findViewById<TextView>(R.id.tv_audio_name)
val audioType = audioView.findViewById<TextView>(R.id.tv_audio_type)
val btnRemove = audioView.findViewById<ImageButton>(R.id.btn_audio_remove)
audioName.text = audioFile!!.name
// TODO: hard code
audioType.text = "wav"
btnRemove.setOnClickListener {
audioFile = null
refreshTopScrollContainer()
}
topScrollContainer.addView(audioView)
}
}
}
private fun reloadRecycleView() {
adapter.notifyDataSetChanged()
binding.rvChat.scrollToPosition(messages.size - 1)
}
companion object {
private const val SP_DOWNLOADED = "sp_downloaded"
private const val TAG = "MainActivity"
}
}
================================================
FILE: bindings/android/app/src/main/java/com/nexa/demo/MyApplication.kt
================================================
// Copyright 2024-2026 Nexa AI, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by a
gitextract_dr3ob_1u/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.yml
│ │ ├── feature_request.yml
│ │ └── model_request.yml
│ └── workflows/
│ ├── build-linux.yml
│ ├── build-macos.yml
│ ├── build-windows.yml
│ ├── lint.yml
│ └── test.yml
├── .gitignore
├── LICENSE
├── NOTICE
├── README.md
├── README_zh.md
├── bindings/
│ ├── android/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── README_zh.md
│ │ ├── app/
│ │ │ ├── .gitignore
│ │ │ ├── build.gradle.kts
│ │ │ ├── libs/
│ │ │ │ ├── okdownload-core.aar
│ │ │ │ ├── okdownload-ktx.aar
│ │ │ │ ├── okdownload-okhttp.aar
│ │ │ │ └── okdownload-sqlite.aar
│ │ │ ├── proguard-rules.pro
│ │ │ ├── src/
│ │ │ │ ├── androidTest/
│ │ │ │ │ └── java/
│ │ │ │ │ └── com/
│ │ │ │ │ └── nexa/
│ │ │ │ │ └── demo/
│ │ │ │ │ └── ExampleInstrumentedTest.kt
│ │ │ │ ├── main/
│ │ │ │ │ ├── AndroidManifest.xml
│ │ │ │ │ ├── assets/
│ │ │ │ │ │ └── model_list.json
│ │ │ │ │ ├── java/
│ │ │ │ │ │ └── com/
│ │ │ │ │ │ └── nexa/
│ │ │ │ │ │ └── demo/
│ │ │ │ │ │ ├── ChatAdapter.kt
│ │ │ │ │ │ ├── FileConfig.kt
│ │ │ │ │ │ ├── GenerationConfigSample.kt
│ │ │ │ │ │ ├── MainActivity.kt
│ │ │ │ │ │ ├── MyApplication.kt
│ │ │ │ │ │ ├── activity/
│ │ │ │ │ │ │ └── FileContentActivity.kt
│ │ │ │ │ │ ├── bean/
│ │ │ │ │ │ │ ├── DownloadFileConfig.kt
│ │ │ │ │ │ │ ├── DownloadState.kt
│ │ │ │ │ │ │ ├── DownloadableFile.kt
│ │ │ │ │ │ │ ├── ModelData.kt
│ │ │ │ │ │ │ ├── NexaManifestBean.kt
│ │ │ │ │ │ │ └── S3FileBean.kt
│ │ │ │ │ │ ├── listeners/
│ │ │ │ │ │ │ └── CustomDialogInterface.kt
│ │ │ │ │ │ ├── ui/
│ │ │ │ │ │ │ └── theme/
│ │ │ │ │ │ │ ├── Color.kt
│ │ │ │ │ │ │ ├── Theme.kt
│ │ │ │ │ │ │ └── Type.kt
│ │ │ │ │ │ └── utils/
│ │ │ │ │ │ ├── BugFixTest.kt
│ │ │ │ │ │ ├── ExecShell.java
│ │ │ │ │ │ ├── ImgUtil.kt
│ │ │ │ │ │ ├── KeyboardUtil.kt
│ │ │ │ │ │ ├── KotlinUtil.kt
│ │ │ │ │ │ ├── MD5Utils.kt
│ │ │ │ │ │ ├── ModelFileListingUtil.kt
│ │ │ │ │ │ ├── PermissionUtil.kt
│ │ │ │ │ │ ├── SharePreferenceKeys.kt
│ │ │ │ │ │ └── WavRecorder.kt
│ │ │ │ │ └── res/
│ │ │ │ │ ├── color/
│ │ │ │ │ │ └── btn_enable_color.xml
│ │ │ │ │ ├── drawable/
│ │ │ │ │ │ ├── bg_ai_message.xml
│ │ │ │ │ │ ├── bg_audio_background.xml
│ │ │ │ │ │ ├── bg_input_box_background.xml
│ │ │ │ │ │ ├── bg_user_message.xml
│ │ │ │ │ │ ├── btn_rounded_black_bg_18.xml
│ │ │ │ │ │ ├── btn_rounded_border.xml
│ │ │ │ │ │ ├── btn_rounded_border_18.xml
│ │ │ │ │ │ ├── btn_rounded_border_gray.xml
│ │ │ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ │ │ ├── ic_launcher_foreground.xml
│ │ │ │ │ │ ├── icon_back.xml
│ │ │ │ │ │ ├── icon_close.xml
│ │ │ │ │ │ ├── icon_database.xml
│ │ │ │ │ │ └── icon_file.xml
│ │ │ │ │ ├── layout/
│ │ │ │ │ │ ├── activity_file_content.xml
│ │ │ │ │ │ ├── activity_main.xml
│ │ │ │ │ │ ├── dialog_select_plugin_id.xml
│ │ │ │ │ │ ├── item_ai_message.xml
│ │ │ │ │ │ ├── item_assistant_image_message.xml
│ │ │ │ │ │ ├── item_audio_scroll.xml
│ │ │ │ │ │ ├── item_image_item_message.xml
│ │ │ │ │ │ ├── item_image_message.xml
│ │ │ │ │ │ ├── item_image_scroll.xml
│ │ │ │ │ │ ├── item_model.xml
│ │ │ │ │ │ ├── item_profile_message.xml
│ │ │ │ │ │ ├── item_user_message.xml
│ │ │ │ │ │ └── menu_layout.xml
│ │ │ │ │ ├── mipmap-anydpi-v26/
│ │ │ │ │ │ ├── ic_launcher.xml
│ │ │ │ │ │ └── ic_launcher_round.xml
│ │ │ │ │ ├── values/
│ │ │ │ │ │ ├── colors.xml
│ │ │ │ │ │ ├── strings.xml
│ │ │ │ │ │ └── themes.xml
│ │ │ │ │ └── xml/
│ │ │ │ │ ├── backup_rules.xml
│ │ │ │ │ ├── data_extraction_rules.xml
│ │ │ │ │ └── file_paths.xml
│ │ │ │ └── test/
│ │ │ │ └── java/
│ │ │ │ └── com/
│ │ │ │ └── nexa/
│ │ │ │ └── demo/
│ │ │ │ └── ExampleUnitTest.kt
│ │ │ └── test
│ │ ├── build.gradle.kts
│ │ ├── gradle/
│ │ │ ├── libs.versions.toml
│ │ │ └── wrapper/
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ │ ├── gradle.properties
│ │ ├── gradlew
│ │ ├── gradlew.bat
│ │ ├── settings.gradle.kts
│ │ └── transform/
│ │ ├── .gitignore
│ │ ├── build.gradle.kts
│ │ ├── consumer-rules.pro
│ │ ├── proguard-rules.pro
│ │ └── src/
│ │ ├── androidTest/
│ │ │ └── java/
│ │ │ └── ai/
│ │ │ └── nexa/
│ │ │ └── transform/
│ │ │ └── ExampleInstrumentedTest.kt
│ │ ├── main/
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java/
│ │ │ └── ai/
│ │ │ └── nexa/
│ │ │ └── transform/
│ │ │ ├── DownloadUtils.kt
│ │ │ ├── ImageUtils.kt
│ │ │ └── VlmContentTransfer.kt
│ │ └── test/
│ │ └── java/
│ │ └── ai/
│ │ └── nexa/
│ │ └── transform/
│ │ └── ExampleUnitTest.kt
│ ├── ios/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ └── README_zh.md
│ └── python/
│ ├── .gitignore
│ ├── README.md
│ ├── README_env_setup.md
│ ├── README_zh.md
│ ├── asr.py
│ ├── cv_ocr.py
│ ├── diarize.py
│ ├── embedder.py
│ ├── env_setup.ps1
│ ├── image_gen.py
│ ├── llm.py
│ ├── models.py
│ ├── notebook/
│ │ ├── macos.ipynb
│ │ ├── windows(arm64).ipynb
│ │ └── windows(x64).ipynb
│ ├── rerank.py
│ ├── tts.py
│ └── vlm.py
├── cookbook/
│ ├── .gitignore
│ ├── PC/
│ │ ├── Agent-Granite/
│ │ │ ├── Python-Binding-Example/
│ │ │ │ ├── README.md
│ │ │ │ ├── agent_nexa.py
│ │ │ │ ├── gradio_ui.py
│ │ │ │ └── requirements.txt
│ │ │ ├── README.md
│ │ │ └── Serve-Example/
│ │ │ ├── README.md
│ │ │ ├── agent_nexa.py
│ │ │ ├── gradio_ui.py
│ │ │ └── requirements.txt
│ │ ├── Multimodal-Qwen3VL/
│ │ │ ├── Python-Binding-Example/
│ │ │ │ ├── gradio_ui.py
│ │ │ │ ├── vlm_service.py
│ │ │ │ └── vlm_viewmodel.py
│ │ │ └── README.md
│ │ ├── RAG-LLM/
│ │ │ ├── Python-Binding-Example/
│ │ │ │ ├── README.md
│ │ │ │ ├── gradio_ui.py
│ │ │ │ └── rag_nexa.py
│ │ │ ├── README.md
│ │ │ └── Serve-Example/
│ │ │ ├── README.md
│ │ │ ├── gradio_ui.py
│ │ │ └── rag_nexa.py
│ │ ├── RAG-VLM/
│ │ │ ├── .gitignore
│ │ │ ├── README.md
│ │ │ ├── gradio_ui.py
│ │ │ ├── rag_nexa.py
│ │ │ └── requirements.txt
│ │ ├── Web-Agent-Qwen3VL/
│ │ │ └── README.md
│ │ ├── function-calling/
│ │ │ ├── .gitignore
│ │ │ ├── README.md
│ │ │ ├── app/
│ │ │ │ ├── flask_ui.py
│ │ │ │ ├── image_utils.py
│ │ │ │ └── templates/
│ │ │ │ └── chat.html
│ │ │ ├── main.py
│ │ │ └── requirements.txt
│ │ └── live-translate/
│ │ ├── README.md
│ │ ├── app.py
│ │ ├── index.html
│ │ └── requirements.txt
│ ├── README.md
│ ├── README_zh.md
│ ├── ag2/
│ │ ├── README.md
│ │ ├── example.py
│ │ └── requirements.txt
│ ├── android/
│ │ └── RAG-LLM/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── app/
│ │ │ ├── .gitignore
│ │ │ ├── build.gradle.kts
│ │ │ ├── libs/
│ │ │ │ ├── okdownload-core.aar
│ │ │ │ ├── okdownload-ktx.aar
│ │ │ │ ├── okdownload-okhttp.aar
│ │ │ │ └── okdownload-sqlite.aar
│ │ │ ├── proguard-rules.pro
│ │ │ ├── src/
│ │ │ │ ├── androidTest/
│ │ │ │ │ └── java/
│ │ │ │ │ └── com/
│ │ │ │ │ └── nexa/
│ │ │ │ │ └── demo/
│ │ │ │ │ └── ExampleInstrumentedTest.kt
│ │ │ │ ├── main/
│ │ │ │ │ ├── AndroidManifest.xml
│ │ │ │ │ ├── assets/
│ │ │ │ │ │ └── model_list.json
│ │ │ │ │ ├── java/
│ │ │ │ │ │ └── com/
│ │ │ │ │ │ └── nexa/
│ │ │ │ │ │ └── demo/
│ │ │ │ │ │ ├── ChatAdapter.kt
│ │ │ │ │ │ ├── FileConfig.kt
│ │ │ │ │ │ ├── GenerationConfigSample.kt
│ │ │ │ │ │ ├── MainActivity.kt
│ │ │ │ │ │ ├── MyApplication.kt
│ │ │ │ │ │ ├── RAGConfig.kt
│ │ │ │ │ │ ├── activity/
│ │ │ │ │ │ │ ├── FileContentActivity.kt
│ │ │ │ │ │ │ └── FolderActivity.kt
│ │ │ │ │ │ ├── adapter/
│ │ │ │ │ │ │ ├── ChunkAdapter.kt
│ │ │ │ │ │ │ ├── IndexViewPagerAdapter.kt
│ │ │ │ │ │ │ ├── SelectImagesAdapter.kt
│ │ │ │ │ │ │ ├── SelectVideosAdapter.kt
│ │ │ │ │ │ │ └── ShowFileDirAdapter.kt
│ │ │ │ │ │ ├── bean/
│ │ │ │ │ │ │ ├── DownloadFileConfig.kt
│ │ │ │ │ │ │ ├── DownloadState.kt
│ │ │ │ │ │ │ ├── DownloadableFile.kt
│ │ │ │ │ │ │ ├── EmbedFileBean.kt
│ │ │ │ │ │ │ ├── EmbedResultBean.kt
│ │ │ │ │ │ │ ├── IndexSelectedDirBean.kt
│ │ │ │ │ │ │ ├── ModelData.kt
│ │ │ │ │ │ │ ├── NexaManifestBean.kt
│ │ │ │ │ │ │ └── S3FileBean.kt
│ │ │ │ │ │ ├── fragments/
│ │ │ │ │ │ │ ├── IndexFragment.kt
│ │ │ │ │ │ │ ├── IndexedImagesFragment.kt
│ │ │ │ │ │ │ ├── IndexedVideosFragment.kt
│ │ │ │ │ │ │ └── UpdatePercentFragment.kt
│ │ │ │ │ │ ├── listeners/
│ │ │ │ │ │ │ └── CustomDialogInterface.kt
│ │ │ │ │ │ ├── ui/
│ │ │ │ │ │ │ └── theme/
│ │ │ │ │ │ │ ├── Color.kt
│ │ │ │ │ │ │ ├── Theme.kt
│ │ │ │ │ │ │ └── Type.kt
│ │ │ │ │ │ ├── utils/
│ │ │ │ │ │ │ ├── BugFixTest.kt
│ │ │ │ │ │ │ ├── DensityUtil.kt
│ │ │ │ │ │ │ ├── ExecShell.java
│ │ │ │ │ │ │ ├── GenerateEmbedStringsUtil.kt
│ │ │ │ │ │ │ ├── ImgUtil.kt
│ │ │ │ │ │ │ ├── KeyboardUtil.kt
│ │ │ │ │ │ │ ├── KotlinUtil.kt
│ │ │ │ │ │ │ ├── MD5Utils.kt
│ │ │ │ │ │ │ ├── ModelFileListingUtil.kt
│ │ │ │ │ │ │ ├── PermissionUtil.kt
│ │ │ │ │ │ │ ├── SharePreferenceKeys.kt
│ │ │ │ │ │ │ └── WavRecorder.kt
│ │ │ │ │ │ └── widget/
│ │ │ │ │ │ └── WrapRadioGroup.kt
│ │ │ │ │ └── res/
│ │ │ │ │ ├── color/
│ │ │ │ │ │ └── btn_enable_color.xml
│ │ │ │ │ ├── drawable/
│ │ │ │ │ │ ├── bg_ai_message.xml
│ │ │ │ │ │ ├── bg_audio_background.xml
│ │ │ │ │ │ ├── bg_circle_gray.xml
│ │ │ │ │ │ ├── bg_citations_bottom.xml
│ │ │ │ │ │ ├── bg_index_bottom.xml
│ │ │ │ │ │ ├── bg_input_box_background.xml
│ │ │ │ │ │ ├── bg_round_gray.xml
│ │ │ │ │ │ ├── bg_spinner_dropdown.xml
│ │ │ │ │ │ ├── bg_topk_bottom.xml
│ │ │ │ │ │ ├── bg_user_message.xml
│ │ │ │ │ │ ├── btn_bg_enable.xml
│ │ │ │ │ │ ├── btn_rounded_black_bg.xml
│ │ │ │ │ │ ├── btn_rounded_black_bg_18.xml
│ │ │ │ │ │ ├── btn_rounded_border.xml
│ │ │ │ │ │ ├── btn_rounded_border_18.xml
│ │ │ │ │ │ ├── btn_rounded_border_gray.xml
│ │ │ │ │ │ ├── btn_rounded_border_gray_8dp.xml
│ │ │ │ │ │ ├── btn_rounded_border_transparent.xml
│ │ │ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ │ │ ├── ic_launcher_foreground.xml
│ │ │ │ │ │ ├── icon_add.xml
│ │ │ │ │ │ ├── icon_alert_yellow.xml
│ │ │ │ │ │ ├── icon_arrow_down.xml
│ │ │ │ │ │ ├── icon_arrow_down_white.xml
│ │ │ │ │ │ ├── icon_arrow_right.xml
│ │ │ │ │ │ ├── icon_back.xml
│ │ │ │ │ │ ├── icon_check.xml
│ │ │ │ │ │ ├── icon_clear.xml
│ │ │ │ │ │ ├── icon_close.xml
│ │ │ │ │ │ ├── icon_config.xml
│ │ │ │ │ │ ├── icon_database.xml
│ │ │ │ │ │ ├── icon_file.xml
│ │ │ │ │ │ ├── icon_tag_cpu.xml
│ │ │ │ │ │ ├── icon_tag_gpu.xml
│ │ │ │ │ │ ├── icon_tag_npu.xml
│ │ │ │ │ │ ├── icon_text.xml
│ │ │ │ │ │ ├── icon_topk_config.xml
│ │ │ │ │ │ ├── img_config.xml
│ │ │ │ │ │ ├── img_config_false.xml
│ │ │ │ │ │ ├── img_config_true.xml
│ │ │ │ │ │ ├── rb_bg.xml
│ │ │ │ │ │ ├── rb_bg_false.xml
│ │ │ │ │ │ ├── rb_bg_true.xml
│ │ │ │ │ │ └── thumb_topk.xml
│ │ │ │ │ ├── layout/
│ │ │ │ │ │ ├── activity_file_content.xml
│ │ │ │ │ │ ├── activity_folder.xml
│ │ │ │ │ │ ├── activity_main.xml
│ │ │ │ │ │ ├── dialog_config.xml
│ │ │ │ │ │ ├── dialog_select_plugin_id.xml
│ │ │ │ │ │ ├── dialog_topk_config.xml
│ │ │ │ │ │ ├── fragment_index.xml
│ │ │ │ │ │ ├── fragment_indexed_images.xml
│ │ │ │ │ │ ├── fragment_indexed_videos.xml
│ │ │ │ │ │ ├── item_ai_message.xml
│ │ │ │ │ │ ├── item_audio_scroll.xml
│ │ │ │ │ │ ├── item_citation.xml
│ │ │ │ │ │ ├── item_image_item_message.xml
│ │ │ │ │ │ ├── item_image_message.xml
│ │ │ │ │ │ ├── item_image_scroll.xml
│ │ │ │ │ │ ├── item_model.xml
│ │ │ │ │ │ ├── item_profile_message.xml
│ │ │ │ │ │ ├── item_select_file.xml
│ │ │ │ │ │ ├── item_select_image.xml
│ │ │ │ │ │ ├── item_spinner_dropdown.xml
│ │ │ │ │ │ ├── item_user_message.xml
│ │ │ │ │ │ ├── menu_layout.xml
│ │ │ │ │ │ └── spinner_custom.xml
│ │ │ │ │ ├── mipmap-anydpi-v26/
│ │ │ │ │ │ ├── ic_launcher.xml
│ │ │ │ │ │ └── ic_launcher_round.xml
│ │ │ │ │ ├── values/
│ │ │ │ │ │ ├── attrs.xml
│ │ │ │ │ │ ├── colors.xml
│ │ │ │ │ │ ├── ids.xml
│ │ │ │ │ │ ├── strings.xml
│ │ │ │ │ │ ├── styles.xml
│ │ │ │ │ │ └── themes.xml
│ │ │ │ │ └── xml/
│ │ │ │ │ ├── backup_rules.xml
│ │ │ │ │ ├── data_extraction_rules.xml
│ │ │ │ │ └── file_paths.xml
│ │ │ │ └── test/
│ │ │ │ └── java/
│ │ │ │ └── com/
│ │ │ │ └── nexa/
│ │ │ │ └── demo/
│ │ │ │ └── ExampleUnitTest.kt
│ │ │ └── test
│ │ ├── build.gradle.kts
│ │ ├── gradle/
│ │ │ ├── libs.versions.toml
│ │ │ └── wrapper/
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ │ ├── gradle.properties
│ │ ├── gradlew
│ │ ├── gradlew.bat
│ │ ├── settings.gradle.kts
│ │ └── transform/
│ │ ├── .gitignore
│ │ ├── build.gradle.kts
│ │ ├── consumer-rules.pro
│ │ ├── proguard-rules.pro
│ │ └── src/
│ │ ├── androidTest/
│ │ │ └── java/
│ │ │ └── ai/
│ │ │ └── nexa/
│ │ │ └── transform/
│ │ │ └── ExampleInstrumentedTest.kt
│ │ ├── main/
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java/
│ │ │ └── ai/
│ │ │ └── nexa/
│ │ │ └── transform/
│ │ │ ├── DownloadUtils.kt
│ │ │ ├── ImageUtils.kt
│ │ │ └── VlmContentTransfer.kt
│ │ └── test/
│ │ └── java/
│ │ └── ai/
│ │ └── nexa/
│ │ └── transform/
│ │ └── ExampleUnitTest.kt
│ ├── clawd/
│ │ ├── README.md
│ │ └── clawdbot.example.json
│ ├── crewai/
│ │ ├── README.md
│ │ ├── example.py
│ │ └── requirements.txt
│ ├── docker/
│ │ └── RAG-VLM/
│ │ ├── Dockerfile
│ │ ├── README.md
│ │ ├── gradio_ui.py
│ │ ├── requirements.txt
│ │ └── start.sh
│ ├── edsl/
│ │ ├── README.md
│ │ ├── example.py
│ │ └── requirements.txt
│ ├── langchain/
│ │ ├── README.md
│ │ ├── example.py
│ │ └── requirements.txt
│ └── llama-index/
│ ├── README.md
│ ├── config.py
│ ├── example.py
│ └── requirements.txt
├── docs/
│ ├── README.md
│ ├── integrate-ag2.md
│ ├── integrate-crewai.md
│ ├── integrate-langchain.md
│ ├── integrate-llamaindex.md
│ └── integrate-openwebui.md
├── pyproject.toml
├── runner/
│ ├── .gitignore
│ ├── Makefile
│ ├── README.md
│ ├── README_zh.md
│ ├── cmd/
│ │ ├── nexa-cli/
│ │ │ ├── common/
│ │ │ │ ├── log.go
│ │ │ │ ├── process.go
│ │ │ │ ├── repl.go
│ │ │ │ ├── util_darwin.go
│ │ │ │ ├── util_linux.go
│ │ │ │ └── util_windows.go
│ │ │ ├── config.go
│ │ │ ├── function_call.go
│ │ │ ├── infer.go
│ │ │ ├── logic/
│ │ │ │ └── cv.go
│ │ │ ├── main.go
│ │ │ ├── model.go
│ │ │ ├── model_test.go
│ │ │ ├── run.go
│ │ │ ├── serve.go
│ │ │ ├── update.go
│ │ │ ├── version.go
│ │ │ └── version_test.go
│ │ └── nexa-launcher/
│ │ └── main.go
│ ├── go.mod
│ ├── go.sum
│ ├── internal/
│ │ ├── config/
│ │ │ ├── config.go
│ │ │ ├── config_test.go
│ │ │ ├── model_mapping.go
│ │ │ └── model_mapping_test.go
│ │ ├── downloader/
│ │ │ └── http.go
│ │ ├── model_hub/
│ │ │ ├── model_hub.go
│ │ │ ├── model_hub_hf.go
│ │ │ ├── model_hub_localfs.go
│ │ │ ├── model_hub_modelscope.go
│ │ │ ├── model_hub_s3.go
│ │ │ ├── model_hub_test.go
│ │ │ └── model_hub_volces.go
│ │ ├── readline/
│ │ │ ├── action.go
│ │ │ ├── buffer.go
│ │ │ ├── history.go
│ │ │ ├── readline.go
│ │ │ ├── terminal.go
│ │ │ ├── terminal_darwin.go
│ │ │ ├── terminal_linux.go
│ │ │ └── terminal_windows.go
│ │ ├── record/
│ │ │ ├── record.go
│ │ │ └── stream_record.go
│ │ ├── render/
│ │ │ ├── progressbar.go
│ │ │ ├── spinner.go
│ │ │ ├── theme.go
│ │ │ └── theme_test.go
│ │ ├── store/
│ │ │ ├── config.go
│ │ │ ├── errors.go
│ │ │ ├── lock.go
│ │ │ ├── manager.go
│ │ │ └── model.go
│ │ └── types/
│ │ ├── model.go
│ │ └── utils.go
│ ├── nexa-sdk/
│ │ ├── .gitignore
│ │ ├── asr.go
│ │ ├── common.go
│ │ ├── cv.go
│ │ ├── diarize.go
│ │ ├── embedder.go
│ │ ├── image_gen.go
│ │ ├── llm.go
│ │ ├── ml.go
│ │ ├── reranker.go
│ │ ├── tts.go
│ │ └── vlm.go
│ ├── release/
│ │ ├── darwin/
│ │ │ ├── Info.plist
│ │ │ ├── entitlements.plist
│ │ │ ├── nexa-icon.icns
│ │ │ └── scripts/
│ │ │ ├── notarize.sh
│ │ │ ├── postinstall
│ │ │ ├── preinstall
│ │ │ ├── prepackage.sh
│ │ │ ├── sign.sh
│ │ │ └── uninstall.sh
│ │ ├── linux/
│ │ │ ├── Dockerfile
│ │ │ ├── install.sh
│ │ │ └── package.sh
│ │ └── windows/
│ │ ├── nexa_installer.iss
│ │ └── nexa_launcher.py
│ ├── server/
│ │ ├── docs/
│ │ │ ├── swagger.go
│ │ │ ├── swagger.yaml
│ │ │ └── ui/
│ │ │ ├── index.css
│ │ │ ├── index.html
│ │ │ ├── oauth2-redirect.html
│ │ │ ├── swagger-initializer.js
│ │ │ ├── swagger-ui-bundle.js
│ │ │ ├── swagger-ui-es-bundle-core.js
│ │ │ ├── swagger-ui-es-bundle.js
│ │ │ ├── swagger-ui-standalone-preset.js
│ │ │ ├── swagger-ui.css
│ │ │ └── swagger-ui.js
│ │ ├── handler/
│ │ │ ├── audio.go
│ │ │ ├── audio_test.go
│ │ │ ├── chat.go
│ │ │ ├── cv.go
│ │ │ ├── embeddings.go
│ │ │ ├── images.go
│ │ │ ├── model.go
│ │ │ └── reranking.go
│ │ ├── middleware/
│ │ │ ├── auth.go
│ │ │ ├── cors.go
│ │ │ └── gil.go
│ │ ├── route.go
│ │ ├── server.go
│ │ ├── service/
│ │ │ ├── keepalive.go
│ │ │ └── service.go
│ │ └── utils/
│ │ ├── common.go
│ │ └── common_test.go
│ └── tests/
│ ├── .gitattributes
│ ├── cases/
│ │ ├── __init__.py
│ │ ├── asr.py
│ │ ├── audio_multi_round.py
│ │ ├── base.py
│ │ ├── cv.py
│ │ ├── image_multi_round.py
│ │ ├── multi_round.py
│ │ ├── reranker.py
│ │ └── single_round.py
│ ├── run.py
│ └── scripts/
│ ├── __init__.py
│ ├── config.py
│ ├── log.py
│ └── utils.py
└── solutions/
├── README.md
└── embedneural/
├── README.md
├── gradio_ui.py
├── nexa_client.py
├── requirements.txt
├── search.py
├── style.py
└── viewmodel.py
Showing preview only (904K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (8708 symbols across 134 files)
FILE: bindings/android/app/src/main/java/com/nexa/demo/utils/ExecShell.java
class ExecShell (line 31) | public class ExecShell {
type SHELL_CMD (line 34) | public enum SHELL_CMD {
method SHELL_CMD (line 38) | SHELL_CMD(String[] command) {
method executeCommand (line 43) | public ArrayList<String> executeCommand(String[] commands) {
method executeCommand (line 67) | public ArrayList<String> executeCommand(SHELL_CMD shellCmd) {
FILE: bindings/python/asr.py
function transcribe_audio (line 41) | def transcribe_audio(asr: ASR, audio_path: str, language: str, timestamp...
function stream_microphone (line 68) | def stream_microphone(asr: ASR, language: str, beam_size: int, timestamp...
function main (line 184) | def main():
FILE: bindings/python/cv_ocr.py
function main (line 29) | def main():
FILE: bindings/python/diarize.py
function main (line 29) | def main():
FILE: bindings/python/embedder.py
function main (line 32) | def main():
FILE: bindings/python/image_gen.py
function main (line 31) | def main():
FILE: bindings/python/llm.py
function main (line 30) | def main():
FILE: bindings/python/models.py
function progress_callback (line 42) | def progress_callback(info: DownloadProgressInfo) -> None:
function main (line 46) | def main():
FILE: bindings/python/rerank.py
function main (line 32) | def main():
FILE: bindings/python/tts.py
function main (line 29) | def main():
FILE: bindings/python/vlm.py
function parse_media_from_input (line 42) | def parse_media_from_input(
function main (line 68) | def main():
FILE: cookbook/PC/Agent-Granite/Python-Binding-Example/agent_nexa.py
class ModelInfo (line 34) | class ModelInfo:
function get_model_info (line 40) | def get_model_info() -> ModelInfo:
function search_web (line 136) | def search_web(query: str):
function write_to_file (line 162) | def write_to_file(file_path: str, content: str):
function handle_function_call (line 171) | def handle_function_call(
function nexa_chat_stream (line 223) | def nexa_chat_stream(model: ModelInfo, prompt: str, system_prompt: str =...
function nexa_chat_completion (line 240) | def nexa_chat_completion(model: ModelInfo, messages: list, system_prompt...
function extract_function_call (line 267) | def extract_function_call(text: str) -> Optional[Tuple[str, dict]]:
function nexa_start_search_stream (line 316) | def nexa_start_search_stream(
function main (line 422) | def main():
FILE: cookbook/PC/Agent-Granite/Python-Binding-Example/gradio_ui.py
function chat_stream_search (line 25) | def chat_stream_search(query: str, history: list):
function on_clear (line 175) | def on_clear():
FILE: cookbook/PC/Agent-Granite/Serve-Example/agent_nexa.py
function search_web (line 80) | def search_web(query: str):
function write_to_file (line 106) | def write_to_file(file_path: str, content: str):
function handle_function_call (line 115) | def handle_function_call(func_name: str, func_args: dict, model: str, en...
function _post_json (line 165) | def _post_json(url: str, payload: dict, timeout: int = 300) -> dict:
function call_nexa_chat (line 185) | def call_nexa_chat(model: str, prompt: str, base: str) -> str:
function call_nexa (line 205) | def call_nexa(prompt: str, model: str, endpoint_base: str) -> str:
function stream_call_nexa_chat (line 212) | def stream_call_nexa_chat(model: str, prompt: str, base: str):
function nexa_chat_messages (line 254) | def nexa_chat_messages(model: str, messages: list, base: str):
function extract_function_call (line 270) | def extract_function_call(text: str) -> Optional[Tuple[str, dict]]:
function nexa_start_search_stream (line 319) | def nexa_start_search_stream(
function main (line 425) | def main():
FILE: cookbook/PC/Agent-Granite/Serve-Example/gradio_ui.py
function chat_stream_search (line 25) | def chat_stream_search(query: str, history: list):
function on_clear (line 175) | def on_clear():
FILE: cookbook/PC/Multimodal-Qwen3VL/Python-Binding-Example/gradio_ui.py
function stream_response (line 26) | def stream_response(
function on_model_repo_change (line 118) | def on_model_repo_change(repo_id):
function on_system_prompt_change (line 146) | def on_system_prompt_change(new_prompt):
function on_id_change (line 149) | def on_id_change():
FILE: cookbook/PC/Multimodal-Qwen3VL/Python-Binding-Example/vlm_service.py
class VLMService (line 47) | class VLMService:
method __init__ (line 52) | def __init__(
method _init_model (line 73) | def _init_model(self):
method stream_response (line 97) | def stream_response(
method update_system_prompt (line 162) | def update_system_prompt(self, system_prompt: str):
method reset (line 170) | def reset(self):
method save_cache (line 182) | def save_cache(self, path: str):
method load_cache (line 186) | def load_cache(self, path: str):
function parse_media_from_input (line 191) | def parse_media_from_input(user_input: str) -> tuple[str, Optional[List[...
function main (line 221) | def main():
FILE: cookbook/PC/Multimodal-Qwen3VL/Python-Binding-Example/vlm_viewmodel.py
class ModelInfo (line 23) | class ModelInfo:
class VLMViewModel (line 30) | class VLMViewModel:
method __init__ (line 34) | def __init__(self) -> None:
method reset (line 37) | def reset(self) -> None:
method create (line 43) | def create(
method stream_response (line 65) | def stream_response(
method _model_of_repo (line 82) | def _model_of_repo(self, repo_id: str) -> ModelInfo:
method update_system_prompt (line 85) | def update_system_prompt(self, system_prompt: str) -> None:
method models (line 91) | def models(self) -> List[ModelInfo]:
FILE: cookbook/PC/RAG-LLM/Python-Binding-Example/gradio_ui.py
function ensure_docs_dir (line 44) | def ensure_docs_dir(path: str) -> None:
function save_uploaded_files (line 58) | def save_uploaded_files(files: List[gr.File], dest_dir: str) -> int:
function open_folder (line 96) | def open_folder(path: str) -> Tuple[bool, Optional[str]]:
function do_rebuild (line 129) | def do_rebuild(docs_dir: str, k: int, chunk_size: int, chunk_overlap: in...
function chat_stream (line 173) | def chat_stream(message: str, history: list, index: Optional[Dict[str, A...
function on_upload (line 305) | def on_upload(files, folder):
function on_rebuild (line 316) | def on_rebuild(d, k_, cs, co):
function on_open (line 327) | def on_open(folder):
function on_clear (line 334) | def on_clear():
FILE: cookbook/PC/RAG-LLM/Python-Binding-Example/rag_nexa.py
class ModelInfo (line 44) | class ModelInfo:
function get_model_info (line 50) | def get_model_info() -> ModelInfo:
function get_embedding_model_info (line 76) | def get_embedding_model_info() -> ModelInfo:
function get_rerank_model_info (line 102) | def get_rerank_model_info() -> ModelInfo:
function get_default_data_folder (line 137) | def get_default_data_folder() -> str:
function call_nexa_chat (line 153) | def call_nexa_chat(model: ModelInfo, messages: List[Dict[str, Any]]):
function call_nexa_chat_completion (line 174) | def call_nexa_chat_completion(model: ModelInfo, messages: List[Dict[str,...
function call_nexa_embeddings (line 194) | def call_nexa_embeddings(embed_model: ModelInfo, inputs: List[str], mode...
function call_nexa_rerank (line 227) | def call_nexa_rerank(rerank_model: ModelInfo, query: str, documents: Lis...
function load_txt (line 259) | def load_txt(path: str) -> str:
function suppress_stderr (line 279) | def suppress_stderr():
function fix_missing_spaces (line 290) | def fix_missing_spaces(text: str) -> str:
function load_pdf (line 317) | def load_pdf(path: str) -> str:
function load_docx (line 330) | def load_docx(path: str) -> str:
function normalize_ws (line 349) | def normalize_ws(s: str) -> str:
function yield_files (line 362) | def yield_files(root: str, exts=(".txt", ".docx")) -> Iterable[str]:
function simple_chunk (line 382) | def simple_chunk(text: str, chunk_size: int = 1000, overlap: int = 150) ...
function build_json_index (line 423) | def build_json_index(
function load_json_index (line 518) | def load_json_index(index_path: str) -> Dict[str, Any]:
function embed_query_server (line 577) | def embed_query_server(query: str, embed_model: ModelInfo, model_folder:...
function search_numpy (line 593) | def search_numpy(
function main (line 634) | def main():
FILE: cookbook/PC/RAG-LLM/Serve-Example/gradio_ui.py
function ensure_docs_dir (line 44) | def ensure_docs_dir(path: str) -> None:
function save_uploaded_files (line 58) | def save_uploaded_files(files: List[gr.File], dest_dir: str) -> int:
function open_folder (line 96) | def open_folder(path: str) -> Tuple[bool, Optional[str]]:
function do_rebuild (line 129) | def do_rebuild(docs_dir: str, k: int, chunk_size: int, chunk_overlap: int,
function chat_stream (line 176) | def chat_stream(message: str, history: list, index: Optional[Dict[str, A...
function on_upload (line 318) | def on_upload(files, folder):
function on_rebuild (line 329) | def on_rebuild(d, k_, cs, co, m, e):
function on_open (line 340) | def on_open(folder):
function on_clear (line 347) | def on_clear():
FILE: cookbook/PC/RAG-LLM/Serve-Example/rag_nexa.py
function get_default_data_folder (line 66) | def get_default_data_folder() -> str:
function _post_json (line 82) | def _post_json(url: str, payload: dict, timeout: int = 300) -> dict:
function call_nexa_chat (line 109) | def call_nexa_chat(model: str, messages: List[Dict[str, Any]], base: str...
function call_nexa_embeddings (line 164) | def call_nexa_embeddings(embed_model: str, inputs: List[str], base: str)...
function call_nexa_rerank (line 218) | def call_nexa_rerank(rerank_model: str, query: str, documents: List[str]...
function load_txt (line 258) | def load_txt(path: str) -> str:
function suppress_stderr (line 278) | def suppress_stderr():
function fix_missing_spaces (line 289) | def fix_missing_spaces(text: str) -> str:
function load_pdf (line 316) | def load_pdf(path: str) -> str:
function load_docx (line 329) | def load_docx(path: str) -> str:
function normalize_ws (line 348) | def normalize_ws(s: str) -> str:
function yield_files (line 361) | def yield_files(root: str, exts=(".txt", ".docx")) -> Iterable[str]:
function simple_chunk (line 381) | def simple_chunk(text: str, chunk_size: int = 1000, overlap: int = 150) ...
function build_json_index (line 422) | def build_json_index(
function load_json_index (line 517) | def load_json_index(index_path: str) -> Dict[str, Any]:
function embed_query_server (line 576) | def embed_query_server(query: str, embed_model: str, endpoint_base: str)...
function search_numpy (line 592) | def search_numpy(
function main (line 633) | def main():
FILE: cookbook/PC/RAG-VLM/gradio_ui.py
function ensure_docs_dir (line 34) | def ensure_docs_dir(path: str) -> None:
function save_uploaded_files (line 38) | def save_uploaded_files(files: List[gr.File], dest_dir: str) -> int:
function open_folder (line 54) | def open_folder(path: str) -> Tuple[bool, str | None]:
function do_rebuild (line 70) | def do_rebuild(docs_dir: str, k: int, chunk_size: int, chunk_overlap: int,
function chat_stream (line 95) | def chat_stream(message: str,
function on_upload (line 239) | def on_upload(files, folder):
function on_rebuild (line 246) | def on_rebuild(d, k_, cs, co, m, e):
function on_open (line 256) | def on_open(folder):
function on_clear (line 262) | def on_clear():
FILE: cookbook/PC/RAG-VLM/rag_nexa.py
function _post_json (line 43) | def _post_json(url: str, payload: dict, timeout: int = 300) -> dict:
function call_nexa_chat (line 50) | def call_nexa_chat(model: str, prompt: str, base: str) -> str:
function call_nexa (line 65) | def call_nexa(prompt: str, model: str, endpoint_base: str) -> str:
function stream_nexa_chat_messages (line 71) | def stream_nexa_chat_messages(model: str, messages: list, base: str):
function call_nexa_embeddings (line 102) | def call_nexa_embeddings(embed_model: str, inputs: List[str], base: str)...
class NexaLLM (line 130) | class NexaLLM(LLM):
method _call (line 135) | def _call(self, prompt: str, **kwargs: Any) -> str:
method _llm_type (line 139) | def _llm_type(self) -> str:
function load_txt (line 144) | def load_txt(path: str) -> str:
function load_pdf (line 154) | def load_pdf(path: str) -> str:
function load_docx (line 158) | def load_docx(path: str) -> str:
function normalize_ws (line 164) | def normalize_ws(s: str) -> str:
function yield_files (line 168) | def yield_files(root: str, exts: Tuple[str, ...] = (".txt", ".docx")) ->...
function load_file (line 175) | def load_file(path: str) -> str:
function yield_images (line 188) | def yield_images(root: str, exts: Tuple[str, ...] = (".png", ".jpg", ".j...
function build_image_index (line 199) | def build_image_index(image_paths: List[str],
function retrieve_topk_images (line 207) | def retrieve_topk_images(query: str, k: int,
function build_chunks_from_folder (line 218) | def build_chunks_from_folder(folder: str,
class _ServerEmbeddingRetriever (line 249) | class _ServerEmbeddingRetriever:
method __init__ (line 254) | def __init__(self, texts: List[str], metas: List[dict], k: int, endpoi...
method get_relevant_documents (line 275) | def get_relevant_documents(self, query: str) -> List[Document]:
function build_retriever (line 289) | def build_retriever(docs: List[Document], k: int = 5, endpoint: str = DE...
function build_chain (line 315) | def build_chain(retriever, model_name: str, endpoint: str):
function main (line 330) | def main():
FILE: cookbook/PC/function-calling/app/flask_ui.py
function allowed_file (line 33) | def allowed_file(filename):
function process_message (line 38) | def process_message(text_content=None, image_path=None):
function add_bot_response (line 56) | def add_bot_response(response_type='text', content=None):
function index (line 67) | def index():
function send_message (line 72) | def send_message():
function get_response (line 120) | async def get_response(task_id):
function get_chat_history (line 275) | def get_chat_history():
function clear_history (line 279) | def clear_history():
function serve_upload (line 285) | def serve_upload(filename):
FILE: cookbook/PC/function-calling/app/image_utils.py
function image_to_base64 (line 22) | def image_to_base64(image_path: Union[str, Path]) -> str:
FILE: cookbook/PC/function-calling/main.py
function _convert_schema_property (line 33) | def _convert_schema_property(prop_schema: Dict[str, Any]) -> Dict[str, A...
function mcp_tool_to_openai_format (line 63) | def mcp_tool_to_openai_format(tool) -> Dict[str, Any]:
function get_mcp_tools (line 88) | async def get_mcp_tools(session: ClientSession) -> List[Dict[str, Any]]:
function normalize_tool_name (line 94) | def normalize_tool_name(tool_name: str, available_tools: List[Dict[str, ...
function execute_mcp_tool (line 123) | async def execute_mcp_tool(session: ClientSession, tool_name: str, argum...
function create_calendar_server (line 135) | def create_calendar_server(credentials: str) -> StdioServerParameters:
function extract_function_call (line 149) | def extract_function_call(text: str):
function _format_nested_properties (line 184) | def _format_nested_properties(props: Dict[str, Any], required: List[str]...
function build_system_prompt (line 221) | def build_system_prompt(tools: list) -> str:
function _handle_function_call_error (line 277) | def _handle_function_call_error(error_text: str, func_args: Dict[str, An...
function _execute_with_retry (line 306) | async def _execute_with_retry(session: ClientSession, func_name: str, fu...
function init_vlm (line 335) | def init_vlm(tools: List[Dict[str, Any]]) -> VLM:
class FunctionCallAgentResult (line 348) | class FunctionCallAgentResult:
function call_agent (line 354) | async def call_agent(
function call_agent_wrapper (line 467) | async def call_agent_wrapper(
function main (line 491) | async def main():
FILE: cookbook/PC/live-translate/app.py
class TranslationStreamManager (line 27) | class TranslationStreamManager:
method __init__ (line 28) | def __init__(self, asr_model: ASR, llm_model: LLM, sid: str, target_la...
method start_stream (line 46) | def start_stream(self, target_language: str = 'zh'):
method push_audio (line 93) | def push_audio(self, audio_bytes: bytes):
method _audio_worker (line 106) | def _audio_worker(self):
method on_new_segment (line 127) | def on_new_segment(self, segment_text: str):
method _translate_text (line 152) | def _translate_text(self, text: str, target_lang: str) -> Optional[str]:
method _enqueue_translation (line 170) | def _enqueue_translation(self, text: str):
method _translation_worker (line 179) | def _translation_worker(self):
method stop_stream (line 204) | def stop_stream(self):
function initialize_models (line 240) | def initialize_models():
function index (line 253) | def index():
function health (line 258) | def health():
function translate_segment (line 269) | def translate_segment():
function handle_connect (line 302) | def handle_connect():
function handle_disconnect (line 307) | def handle_disconnect():
function handle_start_stream (line 317) | def handle_start_stream(data):
function handle_audio_chunk (line 352) | def handle_audio_chunk(data):
function handle_stop_stream (line 383) | def handle_stop_stream():
function cleanup_models (line 393) | def cleanup_models():
FILE: cookbook/ag2/example.py
function create_llm_config (line 14) | def create_llm_config():
function single_agent_example (line 24) | def single_agent_example():
function two_agent_example (line 49) | def two_agent_example():
function main (line 87) | def main():
FILE: cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/utils/ExecShell.java
class ExecShell (line 31) | public class ExecShell {
type SHELL_CMD (line 34) | public enum SHELL_CMD {
method SHELL_CMD (line 38) | SHELL_CMD(String[] command) {
method executeCommand (line 43) | public ArrayList<String> executeCommand(String[] commands) {
method executeCommand (line 67) | public ArrayList<String> executeCommand(SHELL_CMD shellCmd) {
FILE: cookbook/crewai/example.py
function create_llm (line 14) | def create_llm():
function basic_agent_example (line 22) | def basic_agent_example():
function writer_example (line 54) | def writer_example():
function main (line 85) | def main():
FILE: cookbook/docker/RAG-VLM/gradio_ui.py
function setup_logging (line 38) | def setup_logging(log_level: str = "INFO", log_file: Optional[str] = None):
function image_array_to_base64 (line 84) | def image_array_to_base64(image_array: np.ndarray) -> str:
function call_nexa_chat_stream (line 106) | def call_nexa_chat_stream(
function extract_first_frame (line 212) | def extract_first_frame(video_path: str) -> Optional[np.ndarray]:
function extract_frames_from_video (line 228) | def extract_frames_from_video(
function process_video_stream (line 285) | def process_video_stream(
function on_video_upload (line 489) | def on_video_upload(video):
function normalize_endpoint (line 508) | def normalize_endpoint(endpoint_url: str) -> str:
function process_wrapper (line 517) | def process_wrapper(video, model, endpoint, prompt, interval, ngl):
function stop_wrapper (line 564) | def stop_wrapper():
FILE: cookbook/edsl/example.py
function create_model (line 27) | def create_model():
function simple_survey_example (line 41) | def simple_survey_example():
function main (line 60) | def main():
FILE: cookbook/langchain/example.py
function main (line 41) | def main():
FILE: cookbook/llama-index/example.py
function streaming_completion_example (line 16) | def streaming_completion_example():
function streaming_chat_example (line 40) | def streaming_chat_example():
function streaming_multi_turn_with_context (line 71) | def streaming_multi_turn_with_context():
function main (line 118) | def main():
FILE: runner/cmd/nexa-cli/common/log.go
constant LogLevelNone (line 29) | LogLevelNone string = "none"
constant LogLevelTrace (line 30) | LogLevelTrace string = "trace"
constant LogLevelDebug (line 31) | LogLevelDebug string = "debug"
constant LogLevelInfo (line 32) | LogLevelInfo string = "info"
constant LogLevelWarn (line 33) | LogLevelWarn string = "warn"
constant LogLevelError (line 34) | LogLevelError string = "error"
function ApplyLogLevel (line 37) | func ApplyLogLevel() {
FILE: runner/cmd/nexa-cli/common/process.go
type Processor (line 39) | type Processor struct
method Process (line 53) | func (p *Processor) Process() error {
method parseFiles (line 141) | func (p *Processor) parseFiles(prompt string) (string, []string, []str...
method fsmInit (line 203) | func (p *Processor) fsmInit() {
method fsmEvent (line 251) | func (p *Processor) fsmEvent(token string) {
method printProfile (line 268) | func (p *Processor) printProfile(pd nexa_sdk.ProfileData) {
constant STATE_ASSISTANT (line 190) | STATE_ASSISTANT = iota
constant STATE_THINK (line 191) | STATE_THINK
constant STATE_NORMAL (line 192) | STATE_NORMAL
constant STATE_START (line 194) | STATE_START
constant STATE_CHANNEL (line 195) | STATE_CHANNEL
constant STATE_ANALYSIS (line 196) | STATE_ANALYSIS
constant STATE_FINAL (line 197) | STATE_FINAL
constant STATE_END (line 198) | STATE_END
FILE: runner/cmd/nexa-cli/common/repl.go
type Repl (line 39) | type Repl struct
method GetPrompt (line 53) | func (r *Repl) GetPrompt() (string, error) {
method Close (line 205) | func (r *Repl) Close() {
FILE: runner/cmd/nexa-cli/common/util_darwin.go
function GetTerminalWidth (line 21) | func GetTerminalWidth() int {
FILE: runner/cmd/nexa-cli/common/util_linux.go
function GetTerminalWidth (line 21) | func GetTerminalWidth() int {
FILE: runner/cmd/nexa-cli/common/util_windows.go
function GetTerminalWidth (line 23) | func GetTerminalWidth() int {
FILE: runner/cmd/nexa-cli/config.go
function _config (line 27) | func _config() *cobra.Command {
function configGetCmd (line 44) | func configGetCmd() *cobra.Command {
function configSetCmd (line 66) | func configSetCmd() *cobra.Command {
function configListCmd (line 91) | func configListCmd() *cobra.Command {
FILE: runner/cmd/nexa-cli/function_call.go
function functionCall (line 32) | func functionCall() *cobra.Command {
function checkParseTools (line 104) | func checkParseTools(tools []string) (string, error) {
function fcLLM (line 111) | func fcLLM(plugin, modelfile string) error {
function fcVLM (line 168) | func fcVLM(plugin, modelfile, mmprojfile, tokenizerfile string) error {
FILE: runner/cmd/nexa-cli/infer.go
function infer (line 182) | func infer() *cobra.Command {
function ensureModelAvailable (line 317) | func ensureModelAvailable(s *store.Store, name string, quant string) (*t...
function selectQuant (line 330) | func selectQuant(manifest *types.ModelManifest) (string, error) {
function getPromptOrInput (line 350) | func getPromptOrInput() (string, error) {
function loadStopSequences (line 379) | func loadStopSequences() ([]string, error) {
function inferLLM (line 396) | func inferLLM(manifest *types.ModelManifest, quant string) error {
function inferVLM (line 558) | func inferVLM(manifest *types.ModelManifest, quant string) error {
function inferEmbedder (line 702) | func inferEmbedder(manifest *types.ModelManifest, quant string) error {
function inferReranker (line 785) | func inferReranker(manifest *types.ModelManifest, quant string) error {
function inferTTS (line 877) | func inferTTS(manifest *types.ModelManifest, quant string) error {
function inferASR (line 964) | func inferASR(manifest *types.ModelManifest, quant string) error {
function inferDiarize (line 1136) | func inferDiarize(manifest *types.ModelManifest, quant string) error {
function inferCV (line 1238) | func inferCV(manifest *types.ModelManifest, quant string) error {
function inferImageGen (line 1350) | func inferImageGen(manifest *types.ModelManifest, _ string) error {
FILE: runner/cmd/nexa-cli/logic/cv.go
function drawBBoxes (line 39) | func drawBBoxes(img *image.RGBA, results []nexa_sdk.CVResult) {
function drawMask (line 129) | func drawMask(img *image.RGBA, mask []float32, maskColor *color.RGBA) {
function CVPostProcess (line 167) | func CVPostProcess(input string, results []nexa_sdk.CVResult) (string, e...
FILE: runner/cmd/nexa-cli/main.go
function RootCmd (line 46) | func RootCmd() *cobra.Command {
function checkDependency (line 108) | func checkDependency() {
function normalizeModelName (line 143) | func normalizeModelName(name string) (string, string) {
function main (line 171) | func main() {
FILE: runner/cmd/nexa-cli/model.go
function pull (line 47) | func pull() *cobra.Command {
function remove (line 76) | func remove() *cobra.Command {
function clean (line 111) | func clean() *cobra.Command {
function list (line 131) | func list() *cobra.Command {
function pullModel (line 197) | func pullModel(name string, quant string) error {
function getQuant (line 344) | func getQuant(name string) string {
function choosePluginId (line 352) | func choosePluginId(name string) string {
function chooseModelType (line 363) | func chooseModelType() (types.ModelType, error) {
function chooseFiles (line 385) | func chooseFiles(name, specifiedQuant string, files []model_hub.ModelFil...
function chooseQuantFiles (line 705) | func chooseQuantFiles(specifiedQuant string, res *types.ModelManifest) e...
function sumSize (line 767) | func sumSize(files []model_hub.ModelFileInfo) int64 {
function detectMacOSBundles (line 777) | func detectMacOSBundles(files []model_hub.ModelFileInfo) []string {
FILE: runner/cmd/nexa-cli/model_test.go
function TestQuantRegix_MatchAllQuantLevels (line 19) | func TestQuantRegix_MatchAllQuantLevels(t *testing.T) {
FILE: runner/cmd/nexa-cli/run.go
function run (line 47) | func run() *cobra.Command {
function runCompletions (line 147) | func runCompletions(manifest types.ModelManifest, quant string) error {
function runEmbeddings (line 309) | func runEmbeddings(manifest types.ModelManifest, quant string) error {
function runReranking (line 392) | func runReranking(manifest types.ModelManifest, quant string) error {
function runAudioSpeech (line 495) | func runAudioSpeech(manifest types.ModelManifest, quant string) error {
function runAudioTranscription (line 580) | func runAudioTranscription(manifest types.ModelManifest, quant string) e...
function runAudioDiarize (line 676) | func runAudioDiarize(manifest types.ModelManifest, quant string) error {
function runCV (line 777) | func runCV(manifest types.ModelManifest, quant string) error {
function runImagesGenerations (line 871) | func runImagesGenerations(manifest types.ModelManifest, quant string) er...
FILE: runner/cmd/nexa-cli/serve.go
function serve (line 30) | func serve() *cobra.Command {
FILE: runner/cmd/nexa-cli/update.go
constant githubAPIURL (line 41) | githubAPIURL = "https://api.github.com/repos/NexaAI/nexa-sdk/releases/la...
constant userAgent (line 42) | userAgent = "Nexa-Updater/1.0"
constant updateCheckInterval (line 44) | updateCheckInterval = 24 * time.Hour
constant notificationInterval (line 45) | notificationInterval = 8 * time.Hour
constant defaultChunkSize (line 47) | defaultChunkSize = 4 * 1024 * 1024
constant defaultNumWorkers (line 48) | defaultNumWorkers = 16
constant linuxGlobalInstallDir (line 50) | linuxGlobalInstallDir = "/opt/nexa_sdk"
function update (line 53) | func update() *cobra.Command {
function isLinuxGlobalInstall (line 149) | func isLinuxGlobalInstall() bool {
function getLastRelease (line 167) | func getLastRelease() (release, error) {
function hasUpdate (line 191) | func hasUpdate(cur, latest string) (bool, error) {
type release (line 199) | type release struct
type asset (line 204) | type asset struct
function downloadPkg (line 212) | func downloadPkg(url, dst string, size int64, progress chan int64) error {
function installPkg (line 253) | func installPkg(pkgPath string) error {
type updateCheck (line 280) | type updateCheck struct
function getUpdateCheck (line 286) | func getUpdateCheck() (updateCheck, error) {
function setUpdateCheck (line 301) | func setUpdateCheck(ck updateCheck) error {
function checkUpdate (line 310) | func checkUpdate() {
function notifyUpdate (line 335) | func notifyUpdate() {
FILE: runner/cmd/nexa-cli/version.go
function version (line 30) | func version() *cobra.Command {
function compareVersion (line 47) | func compareVersion(v1, v2 string) (int, error) {
function isValidVersion (line 94) | func isValidVersion(minVersion string) bool {
FILE: runner/cmd/nexa-cli/version_test.go
function TestCompareVersion (line 21) | func TestCompareVersion(t *testing.T) {
FILE: runner/cmd/nexa-launcher/main.go
function initPath (line 29) | func initPath() {
function main (line 45) | func main() {
FILE: runner/internal/config/config.go
type Config (line 23) | type Config struct
function Get (line 46) | func Get() *Config {
function GetLog (line 52) | func GetLog() string {
function init (line 59) | func init() {
function get (line 68) | func get() {
FILE: runner/internal/config/model_mapping.go
function GetModelMapping (line 64) | func GetModelMapping(shortcut string) (string, bool) {
FILE: runner/internal/config/model_mapping_test.go
function TestGetModelMapping (line 21) | func TestGetModelMapping(t *testing.T) {
FILE: runner/internal/downloader/http.go
type HTTPDownloader (line 29) | type HTTPDownloader struct
method DownloadChunk (line 54) | func (d *HTTPDownloader) DownloadChunk(ctx context.Context, url string...
function NewDownloader (line 39) | func NewDownloader(authToken string) *HTTPDownloader {
function resolveRelativeURL (line 127) | func resolveRelativeURL(base, location string) string {
FILE: runner/internal/model_hub/model_hub.go
constant ProgressSuffix (line 39) | ProgressSuffix = ".progress"
type ModelFileInfo (line 41) | type ModelFileInfo struct
type ModelHub (line 46) | type ModelHub interface
function SetHub (line 64) | func SetHub(h ModelHub) {
function ModelInfo (line 70) | func ModelInfo(ctx context.Context, modelName string) ([]ModelFileInfo, ...
function GetFileContent (line 116) | func GetFileContent(ctx context.Context, modelName, fileName string) ([]...
type downloadTask (line 133) | type downloadTask struct
constant minChunkSize (line 144) | minChunkSize = 16 * 1024 * 1024
function StartDownload (line 147) | func StartDownload(ctx context.Context, modelName, outputPath string, fi...
function checkChinaMainland (line 264) | func checkChinaMainland() bool {
function getHub (line 301) | func getHub(ctx context.Context, modelName string) (ModelHub, error) {
function doTask (line 326) | func doTask(ctx context.Context, hub ModelHub, task downloadTask) error {
function code2error (line 349) | func code2error(client *resty.Client, response *resty.Response) error {
FILE: runner/internal/model_hub/model_hub_hf.go
constant HF_ENDPOINT (line 34) | HF_ENDPOINT = "https://huggingface.co"
type HuggingFace (line 36) | type HuggingFace struct
method ChinaMainlandOnly (line 44) | func (d *HuggingFace) ChinaMainlandOnly() bool {
method MaxConcurrency (line 48) | func (d *HuggingFace) MaxConcurrency() int {
method CheckAvailable (line 57) | func (d *HuggingFace) CheckAvailable(ctx context.Context, name string)...
method ModelInfo (line 61) | func (d *HuggingFace) ModelInfo(ctx context.Context, name string) ([]M...
method GetFileContent (line 127) | func (d *HuggingFace) GetFileContent(ctx context.Context, modelName, f...
function NewHuggingFace (line 40) | func NewHuggingFace() *HuggingFace {
FILE: runner/internal/model_hub/model_hub_localfs.go
type LocalFS (line 24) | type LocalFS struct
method ChinaMainlandOnly (line 32) | func (d *LocalFS) ChinaMainlandOnly() bool {
method MaxConcurrency (line 36) | func (d *LocalFS) MaxConcurrency() int {
method CheckAvailable (line 40) | func (d *LocalFS) CheckAvailable(ctx context.Context, name string) err...
method ModelInfo (line 52) | func (d *LocalFS) ModelInfo(ctx context.Context, name string) ([]Model...
method GetFileContent (line 80) | func (d *LocalFS) GetFileContent(ctx context.Context, modelName, fileN...
function NewLocalFS (line 28) | func NewLocalFS(base string) *LocalFS {
FILE: runner/internal/model_hub/model_hub_modelscope.go
constant MS_ENDPOINT (line 30) | MS_ENDPOINT = "https://modelscope.cn"
type ModelScope (line 32) | type ModelScope struct
method ChinaMainlandOnly (line 40) | func (d *ModelScope) ChinaMainlandOnly() bool {
method MaxConcurrency (line 44) | func (d *ModelScope) MaxConcurrency() int {
method CheckAvailable (line 48) | func (d *ModelScope) CheckAvailable(ctx context.Context, name string) ...
method ModelInfo (line 62) | func (d *ModelScope) ModelInfo(ctx context.Context, name string) ([]Mo...
method modelInfo (line 66) | func (d *ModelScope) modelInfo(ctx context.Context, name string, root ...
method GetFileContent (line 115) | func (d *ModelScope) GetFileContent(ctx context.Context, modelName, fi...
function NewModelScope (line 36) | func NewModelScope() *ModelScope {
FILE: runner/internal/model_hub/model_hub_s3.go
type S3 (line 30) | type S3 struct
method initS3Client (line 40) | func (s *S3) initS3Client() {
method ChinaMainlandOnly (line 53) | func (s *S3) ChinaMainlandOnly() bool {
method MaxConcurrency (line 57) | func (s *S3) MaxConcurrency() int {
method CheckAvailable (line 61) | func (s *S3) CheckAvailable(ctx context.Context, modelName string) err...
method ModelInfo (line 83) | func (s *S3) ModelInfo(ctx context.Context, modelName string) ([]Model...
method GetFileContent (line 104) | func (s *S3) GetFileContent(ctx context.Context, modelName, fileName s...
function NewS3 (line 34) | func NewS3() *S3 {
FILE: runner/internal/model_hub/model_hub_test.go
constant MODEL_NAME (line 26) | MODEL_NAME = "NexaAI/OmniNeural-4B"
function TestMain (line 28) | func TestMain(m *testing.M) {
function TestModelInfo (line 40) | func TestModelInfo(t *testing.T) {
function TestGetFileContent (line 48) | func TestGetFileContent(t *testing.T) {
function TestDownload (line 58) | func TestDownload(t *testing.T) {
function BenchmarkDownload (line 76) | func BenchmarkDownload(b *testing.B) {
FILE: runner/internal/model_hub/model_hub_volces.go
type Volces (line 30) | type Volces struct
method initS3Client (line 44) | func (v *Volces) initS3Client() {
method ChinaMainlandOnly (line 58) | func (v *Volces) ChinaMainlandOnly() bool {
method MaxConcurrency (line 62) | func (v *Volces) MaxConcurrency() int {
method CheckAvailable (line 66) | func (v *Volces) CheckAvailable(ctx context.Context, modelName string)...
method ModelInfo (line 88) | func (v *Volces) ModelInfo(ctx context.Context, modelName string) ([]M...
method GetFileContent (line 109) | func (v *Volces) GetFileContent(ctx context.Context, modelName, fileNa...
function NewVolces (line 34) | func NewVolces() *Volces {
FILE: runner/internal/readline/action.go
constant Null (line 29) | Null = 0
constant CtrlA (line 30) | CtrlA = 1
constant CtrlB (line 31) | CtrlB = 2
constant CtrlC (line 32) | CtrlC = 3
constant CtrlD (line 33) | CtrlD = 4
constant CtrlE (line 34) | CtrlE = 5
constant CtrlF (line 35) | CtrlF = 6
constant Bell (line 36) | Bell = 7
constant CtrlH (line 37) | CtrlH = 8
constant Tab (line 38) | Tab = 9
constant CtrlJ (line 39) | CtrlJ = 10
constant Kill (line 40) | Kill = 11
constant CtrlL (line 41) | CtrlL = 12
constant Enter (line 42) | Enter = 13
constant Next (line 43) | Next = 14
constant Prev (line 44) | Prev = 16
constant BckSearch (line 45) | BckSearch = 18
constant FwdSearch (line 46) | FwdSearch = 19
constant Transpose (line 47) | Transpose = 20
constant CtrlU (line 48) | CtrlU = 21
constant CtrlW (line 49) | CtrlW = 23
constant CtrlY (line 50) | CtrlY = 25
constant CtrlZ (line 51) | CtrlZ = 26
constant Esc (line 52) | Esc = 27
constant Backspace (line 53) | Backspace = 127
method initializeEventMaps (line 56) | func (rl *Readline) initializeEventMaps() {
method noop (line 115) | func (rl *Readline) noop() error {
method interrupt (line 121) | func (rl *Readline) interrupt() error {
method eof (line 132) | func (rl *Readline) eof() error {
method esc (line 139) | func (rl *Readline) esc() error {
method pasteStart (line 144) | func (rl *Readline) pasteStart() error {
method pasteEnd (line 149) | func (rl *Readline) pasteEnd() error {
method left (line 156) | func (rl *Readline) left() error {
method right (line 163) | func (rl *Readline) right() error {
method begin (line 170) | func (rl *Readline) begin() error {
method end (line 175) | func (rl *Readline) end() error {
method backspace (line 182) | func (rl *Readline) backspace() error {
method delete (line 190) | func (rl *Readline) delete() error {
method clear (line 197) | func (rl *Readline) clear() error {
method tab (line 202) | func (rl *Readline) tab() error {
method enter (line 210) | func (rl *Readline) enter() error {
method prevHistory (line 221) | func (rl *Readline) prevHistory() error {
method nextHistory (line 230) | func (rl *Readline) nextHistory() error {
FILE: runner/internal/readline/buffer.go
type Buffer (line 29) | type Buffer struct
method insertRuneAtCursor (line 48) | func (b *Buffer) insertRuneAtCursor(r rune) {
method resetState (line 55) | func (b *Buffer) resetState() {
method refresh (line 61) | func (b *Buffer) refresh() {
function NewBuffer (line 40) | func NewBuffer(prompt, altPrompt string) *Buffer {
function calcANSIWidth (line 144) | func calcANSIWidth(s string) int {
FILE: runner/internal/readline/history.go
type History (line 18) | type History struct
method Add (line 35) | func (h *History) Add(entry []rune) {
method Prev (line 40) | func (h *History) Prev() []rune {
method Next (line 48) | func (h *History) Next() []rune {
method Save (line 58) | func (h *History) Save() error {
function NewHistory (line 27) | func NewHistory(file string) *History {
FILE: runner/internal/readline/readline.go
type Config (line 21) | type Config struct
type Readline (line 27) | type Readline struct
method Read (line 64) | func (rl *Readline) Read() (string, error) {
method parse (line 88) | func (rl *Readline) parse(r rune) error {
method Close (line 140) | func (rl *Readline) Close() error {
function New (line 42) | func New(config *Config) (*Readline, error) {
FILE: runner/internal/readline/terminal.go
type Terminal (line 22) | type Terminal struct
method Read (line 45) | func (t *Terminal) Read() (rune, error) {
method Close (line 50) | func (t *Terminal) Close() error {
method EnterRaw (line 54) | func (t *Terminal) EnterRaw() error {
method ExitRaw (line 63) | func (t *Terminal) ExitRaw() error {
function NewTerminal (line 28) | func NewTerminal() (*Terminal, error) {
FILE: runner/internal/readline/terminal_darwin.go
type Termios (line 22) | type Termios
function getTermios (line 24) | func getTermios() (*Termios, error) {
function setTermios (line 34) | func setTermios(termios *Termios) error {
function applyRawMode (line 43) | func applyRawMode(termios *Termios) {
FILE: runner/internal/readline/terminal_linux.go
type Termios (line 22) | type Termios
function getTermios (line 24) | func getTermios() (*Termios, error) {
function setTermios (line 34) | func setTermios(termios *Termios) error {
function applyRawMode (line 43) | func applyRawMode(termios *Termios) {
FILE: runner/internal/readline/terminal_windows.go
type Termios (line 19) | type Termios
function getTermios (line 21) | func getTermios() (*Termios, error) {
function setTermios (line 26) | func setTermios(termios *Termios) error {
function applyRawMode (line 30) | func applyRawMode(termios *Termios) {
FILE: runner/internal/record/record.go
type Recorder (line 25) | type Recorder struct
method Run (line 59) | func (r *Recorder) Run() error {
method Stop (line 63) | func (r *Recorder) Stop() error {
method GetOutputFile (line 72) | func (r *Recorder) GetOutputFile() string {
function NewRecorder (line 30) | func NewRecorder(outputFile string) (*Recorder, error) {
FILE: runner/internal/record/stream_record.go
type StreamRecorder (line 28) | type StreamRecorder struct
method Start (line 85) | func (sr *StreamRecorder) Start() error {
method ReadFloat32 (line 89) | func (sr *StreamRecorder) ReadFloat32(buffer []float32) (int, error) {
method Stop (line 109) | func (sr *StreamRecorder) Stop() error {
function NewStreamRecorder (line 33) | func NewStreamRecorder() (*StreamRecorder, error) {
FILE: runner/internal/render/progressbar.go
type ProgressBar (line 25) | type ProgressBar struct
method Set (line 52) | func (p *ProgressBar) Set(current int64) {
method Add (line 57) | func (p *ProgressBar) Add(chunk int64) {
method Exit (line 62) | func (p *ProgressBar) Exit() {
method Clear (line 67) | func (p *ProgressBar) Clear() {
function NewProgressBar (line 30) | func NewProgressBar(total int64, description string) *ProgressBar {
FILE: runner/internal/render/spinner.go
type Spinner (line 25) | type Spinner struct
method Start (line 41) | func (s *Spinner) Start() {
method Stop (line 57) | func (s *Spinner) Stop() {
function NewSpinner (line 31) | func NewSpinner(desc string) *Spinner {
FILE: runner/internal/render/theme.go
type Theme (line 28) | type Theme struct
method Set (line 63) | func (t *Theme) Set(s Style) {
method Reset (line 67) | func (t *Theme) Reset() {
function GetTheme (line 43) | func GetTheme() *Theme {
type Style (line 51) | type Style interface
type NoColor (line 57) | type NoColor struct
method Sprint (line 59) | func (n NoColor) Sprint(a ...any) string { return fmt....
method Sprintf (line 60) | func (n NoColor) Sprintf(format string, a ...any) string { return fmt....
method Code (line 61) | func (n NoColor) Code() string { return "" }
function noColorTheme (line 71) | func noColorTheme() *Theme {
function defaultColorTheme (line 87) | func defaultColorTheme() *Theme {
FILE: runner/internal/render/theme_test.go
function TestThemeColor (line 22) | func TestThemeColor(t *testing.T) {
FILE: runner/internal/store/config.go
method ConfigGet (line 23) | func (s *Store) ConfigGet(key string) (string, error) {
method ConfigSet (line 29) | func (s *Store) ConfigSet(key string, value string) error {
FILE: runner/internal/store/lock.go
method LockModel (line 25) | func (s *Store) LockModel(modelName string) error {
method UnlockModel (line 50) | func (s *Store) UnlockModel(modelName string) error {
FILE: runner/internal/store/manager.go
type Store (line 30) | type Store struct
method init (line 50) | func (s *Store) init() {
method Close (line 76) | func (s *Store) Close() error {
method cleanCorruptedDirectories (line 89) | func (s *Store) cleanCorruptedDirectories() {
method isCorruptedModelDirectory (line 114) | func (s *Store) isCorruptedModelDirectory(name string) bool {
function Get (line 41) | func Get() *Store {
FILE: runner/internal/store/model.go
function isBundlePath (line 35) | func isBundlePath(path string) bool {
method ensureEnoughDiskSpace (line 40) | func (s *Store) ensureEnoughDiskSpace(requiredBytes int64) error {
method List (line 56) | func (s *Store) List() ([]types.ModelManifest, error) {
method Remove (line 77) | func (s *Store) Remove(name string) error {
method Clean (line 89) | func (s *Store) Clean() int {
method GetManifest (line 110) | func (s *Store) GetManifest(name string) (*types.ModelManifest, error) {
method Pull (line 136) | func (s *Store) Pull(ctx context.Context, mf types.ModelManifest) (infoC...
method PullExtraQuant (line 244) | func (s *Store) PullExtraQuant(ctx context.Context, omf, nmf types.Model...
method DataPath (line 329) | func (s *Store) DataPath() string {
method ModelDirPath (line 333) | func (s *Store) ModelDirPath() string {
method ModelfilePath (line 338) | func (s *Store) ModelfilePath(name string, file string) string {
method scanModelDir (line 342) | func (s *Store) scanModelDir() ([]string, error) {
FILE: runner/internal/types/model.go
type ModelType (line 17) | type ModelType
constant ModelTypeLLM (line 20) | ModelTypeLLM ModelType = "llm"
constant ModelTypeVLM (line 21) | ModelTypeVLM ModelType = "vlm"
constant ModelTypeEmbedder (line 22) | ModelTypeEmbedder ModelType = "embedder"
constant ModelTypeReranker (line 23) | ModelTypeReranker ModelType = "reranker"
constant ModelTypeTTS (line 24) | ModelTypeTTS ModelType = "tts"
constant ModelTypeASR (line 25) | ModelTypeASR ModelType = "asr"
constant ModelTypeDiarize (line 26) | ModelTypeDiarize ModelType = "diarize"
constant ModelTypeCV (line 27) | ModelTypeCV ModelType = "cv"
constant ModelTypeImageGen (line 28) | ModelTypeImageGen ModelType = "image_gen"
type ModelFileInfo (line 43) | type ModelFileInfo struct
type ModelManifest (line 49) | type ModelManifest struct
method GetSize (line 63) | func (m ModelManifest) GetSize() int64 {
type ModelParam (line 86) | type ModelParam struct
type DownloadInfo (line 91) | type DownloadInfo struct
FILE: runner/internal/types/utils.go
type TeeReadF (line 19) | type TeeReadF struct
method Read (line 24) | func (w *TeeReadF) Read(p []byte) (n int, err error) {
FILE: runner/nexa-sdk/asr.go
type ASRConfig (line 30) | type ASRConfig struct
method toCPtr (line 47) | func (ac ASRConfig) toCPtr() *C.ml_ASRConfig {
type ASRStreamConfig (line 37) | type ASRStreamConfig struct
method toCPtr (line 60) | func (asc ASRStreamConfig) toCPtr() *C.ml_ASRStreamConfig {
function freeASRConfig (line 77) | func freeASRConfig(cPtr *C.ml_ASRConfig) {
function freeASRStreamConfig (line 86) | func freeASRStreamConfig(cPtr *C.ml_ASRStreamConfig) {
type ASRResult (line 96) | type ASRResult struct
function newASRResultFromCPtr (line 102) | func newASRResultFromCPtr(c *C.ml_ASRResult) ASRResult {
function freeASRResult (line 134) | func freeASRResult(ptr *C.ml_ASRResult) {
type ASRModelConfig (line 150) | type ASRModelConfig struct
method toCPtr (line 182) | func (mc ASRModelConfig) toCPtr() *C.ml_ModelConfig {
type AsrCreateInput (line 170) | type AsrCreateInput struct
method toCPtr (line 218) | func (aci AsrCreateInput) toCPtr() *C.ml_AsrCreateInput {
function freeAsrCreateInput (line 251) | func freeAsrCreateInput(cPtr *C.ml_AsrCreateInput) {
type AsrTranscribeInput (line 283) | type AsrTranscribeInput struct
method toCPtr (line 289) | func (ati AsrTranscribeInput) toCPtr() *C.ml_AsrTranscribeInput {
function freeAsrTranscribeInput (line 308) | func freeAsrTranscribeInput(cPtr *C.ml_AsrTranscribeInput) {
type AsrTranscribeOutput (line 324) | type AsrTranscribeOutput struct
function newAsrTranscribeOutputFromCPtr (line 329) | func newAsrTranscribeOutputFromCPtr(c *C.ml_AsrTranscribeOutput) AsrTran...
function freeAsrTranscribeOutput (line 341) | func freeAsrTranscribeOutput(ptr *C.ml_AsrTranscribeOutput) {
type AsrListSupportedLanguagesInput (line 349) | type AsrListSupportedLanguagesInput struct
method toCPtr (line 353) | func (asli AsrListSupportedLanguagesInput) toCPtr() *C.ml_AsrListSuppo...
function freeAsrListSupportedLanguagesInput (line 359) | func freeAsrListSupportedLanguagesInput(cPtr *C.ml_AsrListSupportedLangu...
type AsrListSupportedLanguagesOutput (line 366) | type AsrListSupportedLanguagesOutput struct
function newAsrListSupportedLanguagesOutputFromCPtr (line 370) | func newAsrListSupportedLanguagesOutputFromCPtr(c *C.ml_AsrListSupported...
function freeAsrListSupportedLanguagesOutput (line 382) | func freeAsrListSupportedLanguagesOutput(ptr *C.ml_AsrListSupportedLangu...
type ASRTranscriptionCallback (line 392) | type ASRTranscriptionCallback
type AsrStreamBeginInput (line 395) | type AsrStreamBeginInput struct
method toCPtr (line 550) | func (asbi AsrStreamBeginInput) toCPtr() *C.ml_AsrStreamBeginInput {
type AsrStreamBeginOutput (line 403) | type AsrStreamBeginOutput struct
type AsrStreamPushAudioInput (line 408) | type AsrStreamPushAudioInput struct
method toCPtr (line 593) | func (aspai AsrStreamPushAudioInput) toCPtr() *C.ml_AsrStreamPushAudio...
type AsrStreamStopInput (line 413) | type AsrStreamStopInput struct
method toCPtr (line 611) | func (assi AsrStreamStopInput) toCPtr() *C.ml_AsrStreamStopInput {
type ASR (line 418) | type ASR struct
method Destroy (line 439) | func (a *ASR) Destroy() error {
method Transcribe (line 455) | func (a *ASR) Transcribe(input AsrTranscribeInput) (AsrTranscribeOutpu...
method ListSupportedLanguages (line 474) | func (a *ASR) ListSupportedLanguages() (AsrListSupportedLanguagesOutpu...
method StreamBegin (line 493) | func (a *ASR) StreamBegin(input AsrStreamBeginInput) (AsrStreamBeginOu...
method StreamPushAudio (line 516) | func (a *ASR) StreamPushAudio(input AsrStreamPushAudioInput) error {
method StreamStop (line 531) | func (a *ASR) StreamStop(input AsrStreamStopInput) error {
function NewASR (line 423) | func NewASR(input AsrCreateInput) (*ASR, error) {
function freeAsrStreamBeginInput (line 568) | func freeAsrStreamBeginInput(cPtr *C.ml_AsrStreamBeginInput) {
function newAsrStreamBeginOutputFromCPtr (line 580) | func newAsrStreamBeginOutputFromCPtr(c *C.ml_AsrStreamBeginOutput) AsrSt...
function freeAsrStreamBeginOutput (line 589) | func freeAsrStreamBeginOutput(ptr *C.ml_AsrStreamBeginOutput) {
function freeAsrStreamPushAudioInput (line 605) | func freeAsrStreamPushAudioInput(cPtr *C.ml_AsrStreamPushAudioInput) {
function freeAsrStreamStopInput (line 620) | func freeAsrStreamStopInput(cPtr *C.ml_AsrStreamStopInput) {
FILE: runner/nexa-sdk/common.go
function mlFree (line 31) | func mlFree(ptr unsafe.Pointer) {
function sliceToCCharArray (line 35) | func sliceToCCharArray(slice []string) (**C.char, C.int32_t) {
function cCharArrayToSlice (line 52) | func cCharArrayToSlice(ptr **C.char, count C.int32_t) []string {
function freeCCharArray (line 65) | func freeCCharArray(ptr **C.char, count C.int32_t) {
function mlFreeCCharArray (line 76) | func mlFreeCCharArray(ptr **C.char, count C.int32_t) {
type OnTokenCallback (line 97) | type OnTokenCallback
function go_generate_stream_on_token (line 102) | func go_generate_stream_on_token(token *C.char, _ *C.void) C.bool {
function go_asr_stream_on_transcription (line 112) | func go_asr_stream_on_transcription(text *C.char, _ *C.void) {
type ProfileData (line 123) | type ProfileData struct
method TotalTokens (line 136) | func (p ProfileData) TotalTokens() int64 {
method TotalTimeUs (line 140) | func (p ProfileData) TotalTimeUs() int64 {
function newProfileDataFromCPtr (line 144) | func newProfileDataFromCPtr(c C.ml_ProfileData) ProfileData {
type SamplerConfig (line 162) | type SamplerConfig struct
method toCPtr (line 178) | func (sc SamplerConfig) toCPtr() *C.ml_SamplerConfig {
function freeSamplerConfig (line 203) | func freeSamplerConfig(cPtr *C.ml_SamplerConfig) {
type GenerationConfig (line 215) | type GenerationConfig struct
method toCPtr (line 225) | func (gc GenerationConfig) toCPtr() *C.ml_GenerationConfig {
function freeGenerationConfig (line 256) | func freeGenerationConfig(ptr *C.ml_GenerationConfig) {
type ModelConfig (line 270) | type ModelConfig struct
FILE: runner/nexa-sdk/cv.go
type CVCapabilities (line 29) | type CVCapabilities
constant CVCapabilityOCR (line 32) | CVCapabilityOCR CVCapabilities = C.ML_CV_OCR
constant CVCapabilityClassification (line 33) | CVCapabilityClassification CVCapabilities = C.ML_CV_CLASSIFICATION
constant CVCapabilitySegmentation (line 34) | CVCapabilitySegmentation CVCapabilities = C.ML_CV_SEGMENTATION
constant CVCapabilityCustom (line 35) | CVCapabilityCustom CVCapabilities = C.ML_CV_CUSTOM
type BoundingBox (line 39) | type BoundingBox struct
function newBoundingBoxFromCPtr (line 46) | func newBoundingBoxFromCPtr(c *C.ml_BoundingBox) BoundingBox {
type CVResult (line 62) | type CVResult struct
method String (line 75) | func (c CVResult) String() string {
function newCVResultFromCPtr (line 80) | func newCVResultFromCPtr(c *C.ml_CVResult) CVResult {
function freeCVResult (line 132) | func freeCVResult(ptr *C.ml_CVResult) {
type CVModelConfig (line 165) | type CVModelConfig struct
method toCPtr (line 173) | func (cmc CVModelConfig) toCPtr() *C.ml_CVModelConfig {
type CVCreateInput (line 193) | type CVCreateInput struct
method toCPtr (line 200) | func (cvi CVCreateInput) toCPtr() *C.ml_CVCreateInput {
function freeCVCreateInput (line 222) | func freeCVCreateInput(cPtr *C.ml_CVCreateInput) {
type CVInferInput (line 236) | type CVInferInput struct
method toCPtr (line 240) | func (cii CVInferInput) toCPtr() *C.ml_CVInferInput {
function freeCVInferInput (line 251) | func freeCVInferInput(cPtr *C.ml_CVInferInput) {
type CVInferOutput (line 261) | type CVInferOutput struct
function newCVInferOutputFromCPtr (line 265) | func newCVInferOutputFromCPtr(c *C.ml_CVInferOutput) CVInferOutput {
function freeCVInferOutput (line 284) | func freeCVInferOutput(ptr *C.ml_CVInferOutput) {
type CV (line 300) | type CV struct
method Destroy (line 321) | func (c *CV) Destroy() error {
method Infer (line 337) | func (c *CV) Infer(input CVInferInput) (CVInferOutput, error) {
function NewCV (line 305) | func NewCV(input CVCreateInput) (*CV, error) {
FILE: runner/nexa-sdk/diarize.go
type DiarizeConfig (line 28) | type DiarizeConfig struct
method toCPtr (line 33) | func (dc DiarizeConfig) toCPtr() *C.ml_DiarizeConfig {
function freeDiarizeConfig (line 43) | func freeDiarizeConfig(cPtr *C.ml_DiarizeConfig) {
type DiarizeSpeechSegment (line 50) | type DiarizeSpeechSegment struct
function newDiarizeSpeechSegmentFromCPtr (line 56) | func newDiarizeSpeechSegmentFromCPtr(c *C.ml_DiarizeSpeechSegment) Diari...
function freeDiarizeSpeechSegment (line 73) | func freeDiarizeSpeechSegment(ptr *C.ml_DiarizeSpeechSegment) {
type DiarizeModelConfig (line 83) | type DiarizeModelConfig struct
method toCPtr (line 102) | func (mc DiarizeModelConfig) toCPtr() *C.ml_ModelConfig {
type DiarizeCreateInput (line 139) | type DiarizeCreateInput struct
method toCPtr (line 149) | func (dci DiarizeCreateInput) toCPtr() *C.ml_DiarizeCreateInput {
function freeDiarizeCreateInput (line 176) | func freeDiarizeCreateInput(cPtr *C.ml_DiarizeCreateInput) {
type DiarizeInferInput (line 202) | type DiarizeInferInput struct
method toCPtr (line 207) | func (dii DiarizeInferInput) toCPtr() *C.ml_DiarizeInferInput {
function freeDiarizeInferInput (line 221) | func freeDiarizeInferInput(cPtr *C.ml_DiarizeInferInput) {
type DiarizeInferOutput (line 234) | type DiarizeInferOutput struct
function newDiarizeInferOutputFromCPtr (line 241) | func newDiarizeInferOutputFromCPtr(c *C.ml_DiarizeInferOutput) DiarizeIn...
function freeDiarizeInferOutput (line 264) | func freeDiarizeInferOutput(ptr *C.ml_DiarizeInferOutput) {
type Diarize (line 278) | type Diarize struct
method Destroy (line 299) | func (d *Diarize) Destroy() error {
method Infer (line 315) | func (d *Diarize) Infer(input DiarizeInferInput) (DiarizeInferOutput, ...
function NewDiarize (line 283) | func NewDiarize(input DiarizeCreateInput) (*Diarize, error) {
FILE: runner/nexa-sdk/embedder.go
type EmbeddingConfig (line 28) | type EmbeddingConfig struct
method toCPtr (line 34) | func (ec EmbeddingConfig) toCPtr() *C.ml_EmbeddingConfig {
function freeEmbeddingConfig (line 47) | func freeEmbeddingConfig(cPtr *C.ml_EmbeddingConfig) {
type EmbedderCreateInput (line 57) | type EmbedderCreateInput struct
method toCPtr (line 65) | func (eci EmbedderCreateInput) toCPtr() *C.ml_EmbedderCreateInput {
function freeEmbedderCreateInput (line 88) | func freeEmbedderCreateInput(cPtr *C.ml_EmbedderCreateInput) {
type EmbedderEmbedInput (line 107) | type EmbedderEmbedInput struct
method toCPtr (line 116) | func (eei EmbedderEmbedInput) toCPtr() *C.ml_EmbedderEmbedInput {
function freeEmbedderEmbedInput (line 196) | func freeEmbedderEmbedInput(cPtr *C.ml_EmbedderEmbedInput) {
type EmbedderEmbedOutput (line 241) | type EmbedderEmbedOutput struct
function newEmbedderEmbedOutputFromCPtr (line 246) | func newEmbedderEmbedOutputFromCPtr(c *C.ml_EmbedderEmbedOutput, embeddi...
function freeEmbedderEmbedOutput (line 274) | func freeEmbedderEmbedOutput(ptr *C.ml_EmbedderEmbedOutput) {
type EmbedderDimOutput (line 284) | type EmbedderDimOutput struct
function newEmbedderDimOutputFromCPtr (line 288) | func newEmbedderDimOutputFromCPtr(c *C.ml_EmbedderDimOutput) EmbedderDim...
type Embedder (line 300) | type Embedder struct
method Destroy (line 321) | func (e *Embedder) Destroy() error {
method Embed (line 337) | func (e *Embedder) Embed(input EmbedderEmbedInput) (EmbedderEmbedOutpu...
method EmbeddingDimension (line 362) | func (e *Embedder) EmbeddingDimension() (EmbedderDimOutput, error) {
function NewEmbedder (line 305) | func NewEmbedder(input EmbedderCreateInput) (*Embedder, error) {
FILE: runner/nexa-sdk/image_gen.go
type ImageGenCreateInput (line 28) | type ImageGenCreateInput struct
method toCPtr (line 36) | func (igci ImageGenCreateInput) toCPtr() *C.ml_ImageGenCreateInput {
function freeImageGenCreateInput (line 59) | func freeImageGenCreateInput(cPtr *C.ml_ImageGenCreateInput) {
type ImageSamplerConfig (line 78) | type ImageSamplerConfig struct
type SchedulerConfig (line 87) | type SchedulerConfig struct
type ImageGenerationConfig (line 102) | type ImageGenerationConfig struct
method toCPtr (line 112) | func (igc ImageGenerationConfig) toCPtr() *C.ml_ImageGenerationConfig {
function freeImageGenerationConfig (line 166) | func freeImageGenerationConfig(cPtr *C.ml_ImageGenerationConfig) {
type ImageGenTxt2ImgInput (line 206) | type ImageGenTxt2ImgInput struct
method toCPtr (line 212) | func (igtii ImageGenTxt2ImgInput) toCPtr() *C.ml_ImageGenTxt2ImgInput {
function freeImageGenTxt2ImgInput (line 231) | func freeImageGenTxt2ImgInput(cPtr *C.ml_ImageGenTxt2ImgInput) {
type ImageGenOutput (line 248) | type ImageGenOutput struct
function newImageGenOutputFromCPtr (line 252) | func newImageGenOutputFromCPtr(c *C.ml_ImageGenOutput) ImageGenOutput {
function freeImageGenOutput (line 266) | func freeImageGenOutput(ptr *C.ml_ImageGenOutput) {
type ImageGen (line 276) | type ImageGen struct
method Destroy (line 297) | func (ig *ImageGen) Destroy() error {
method Txt2Img (line 313) | func (ig *ImageGen) Txt2Img(input ImageGenTxt2ImgInput) (ImageGenOutpu...
function NewImageGen (line 281) | func NewImageGen(input ImageGenCreateInput) (*ImageGen, error) {
FILE: runner/nexa-sdk/llm.go
type LLMRole (line 32) | type LLMRole
constant LLMRoleSystem (line 35) | LLMRoleSystem LLMRole = "system"
constant LLMRoleUser (line 36) | LLMRoleUser LLMRole = "user"
constant LLMRoleAssistant (line 37) | LLMRoleAssistant LLMRole = "assistant"
type LlmCreateInput (line 40) | type LlmCreateInput struct
method toCPtr (line 49) | func (lci LlmCreateInput) toCPtr() *C.ml_LlmCreateInput {
function freeLlmCreateInput (line 89) | func freeLlmCreateInput(cPtr *C.ml_LlmCreateInput) {
type LlmGenerateInput (line 119) | type LlmGenerateInput struct
method toCPtr (line 127) | func (lgi LlmGenerateInput) toCPtr() *C.ml_LlmGenerateInput {
function freeLlmGenerateInput (line 161) | func freeLlmGenerateInput(cPtr *C.ml_LlmGenerateInput) {
type LlmGenerateOutput (line 179) | type LlmGenerateOutput struct
function newLlmGenerateOutputFromCPtr (line 184) | func newLlmGenerateOutputFromCPtr(c *C.ml_LlmGenerateOutput) LlmGenerate...
function freeLlmGenerateOutput (line 198) | func freeLlmGenerateOutput(ptr *C.ml_LlmGenerateOutput) {
type LlmChatMessage (line 207) | type LlmChatMessage struct
type llmChatMessages (line 212) | type llmChatMessages
method toCPtr (line 214) | func (lcm llmChatMessages) toCPtr() (*C.ml_LlmChatMessage, C.int32_t) {
function freeLlmChatMessages (line 233) | func freeLlmChatMessages(cPtr *C.ml_LlmChatMessage, count C.int32_t) {
type LlmApplyChatTemplateInput (line 251) | type LlmApplyChatTemplateInput struct
method toCPtr (line 258) | func (lati LlmApplyChatTemplateInput) toCPtr() *C.ml_LlmApplyChatTempl...
function freeLlmApplyChatTemplateInput (line 278) | func freeLlmApplyChatTemplateInput(cPtr *C.ml_LlmApplyChatTemplateInput) {
type LlmApplyChatTemplateOutput (line 289) | type LlmApplyChatTemplateOutput struct
function newLlmApplyChatTemplateOutputFromCPtr (line 293) | func newLlmApplyChatTemplateOutputFromCPtr(c *C.ml_LlmApplyChatTemplateO...
function freeLlmApplyChatTemplateOutput (line 307) | func freeLlmApplyChatTemplateOutput(cPtr *C.ml_LlmApplyChatTemplateOutpu...
type LLM (line 316) | type LLM struct
method Destroy (line 335) | func (l *LLM) Destroy() error {
method Reset (line 350) | func (l *LLM) Reset() error {
method ApplyChatTemplate (line 459) | func (l *LLM) ApplyChatTemplate(input LlmApplyChatTemplateInput) (*Llm...
method SaveKVCache (line 478) | func (l *LLM) SaveKVCache(input LlmSaveKVCacheInput) (*LlmSaveKVCacheO...
method LoadKVCache (line 497) | func (l *LLM) LoadKVCache(input LlmLoadKVCacheInput) (*LlmLoadKVCacheO...
method Generate (line 516) | func (l *LLM) Generate(input LlmGenerateInput) (LlmGenerateOutput, err...
function NewLLM (line 320) | func NewLLM(input LlmCreateInput) (*LLM, error) {
type LlmSaveKVCacheInput (line 364) | type LlmSaveKVCacheInput struct
method toCPtr (line 368) | func (lsci LlmSaveKVCacheInput) toCPtr() *C.ml_KvCacheSaveInput {
function freeLlmSaveKVCacheInput (line 379) | func freeLlmSaveKVCacheInput(cPtr *C.ml_KvCacheSaveInput) {
type LlmSaveKVCacheOutput (line 389) | type LlmSaveKVCacheOutput struct
function newLlmSaveKVCacheOutputFromCPtr (line 393) | func newLlmSaveKVCacheOutputFromCPtr(c *C.ml_KvCacheSaveOutput) LlmSaveK...
function freeLlmSaveKVCacheOutput (line 404) | func freeLlmSaveKVCacheOutput(cPtr *C.ml_KvCacheSaveOutput) {
type LlmLoadKVCacheInput (line 412) | type LlmLoadKVCacheInput struct
method toCPtr (line 416) | func (llci LlmLoadKVCacheInput) toCPtr() *C.ml_KvCacheLoadInput {
function freeLlmLoadKVCacheInput (line 427) | func freeLlmLoadKVCacheInput(cPtr *C.ml_KvCacheLoadInput) {
type LlmLoadKVCacheOutput (line 437) | type LlmLoadKVCacheOutput struct
function newLlmLoadKVCacheOutputFromCPtr (line 441) | func newLlmLoadKVCacheOutputFromCPtr(c *C.ml_KvCacheLoadOutput) LlmLoadK...
function freeLlmLoadKVCacheOutput (line 452) | func freeLlmLoadKVCacheOutput(cPtr *C.ml_KvCacheLoadOutput) {
FILE: runner/nexa-sdk/ml.go
type SDKError (line 52) | type SDKError
method Error (line 54) | func (s SDKError) Error() string {
function SDKErrorCode (line 58) | func SDKErrorCode(err error) int32 {
function Init (line 75) | func Init() {
function DeInit (line 86) | func DeInit() {
function Version (line 91) | func Version() string {
type PluginListOutput (line 95) | type PluginListOutput struct
function newPluginListOutputFromCPtr (line 99) | func newPluginListOutputFromCPtr(c *C.ml_GetPluginListOutput) PluginList...
function GetPluginList (line 105) | func GetPluginList() (*PluginListOutput, error) {
type DeviceListInput (line 122) | type DeviceListInput struct
method toCPtr (line 126) | func (di DeviceListInput) toCPtr() *C.ml_GetDeviceListInput {
function freeDeviceListInput (line 132) | func freeDeviceListInput(cPtr *C.ml_GetDeviceListInput) {
type Device (line 142) | type Device struct
type DeviceListOutput (line 147) | type DeviceListOutput struct
function freeDeviceListOutput (line 151) | func freeDeviceListOutput(c *C.ml_GetDeviceListOutput) {
function newDeviceListOutputFromCPtr (line 159) | func newDeviceListOutputFromCPtr(c *C.ml_GetDeviceListOutput) DeviceList...
function GetDeviceList (line 176) | func GetDeviceList(input DeviceListInput) (*DeviceListOutput, error) {
function go_log_wrap (line 197) | func go_log_wrap(level C.ml_LogLevel, msg *C.char) {
function EnableBridgeLog (line 212) | func EnableBridgeLog(enable bool) {
FILE: runner/nexa-sdk/reranker.go
type RerankConfig (line 28) | type RerankConfig struct
method toCPtr (line 34) | func (rc RerankConfig) toCPtr() *C.ml_RerankConfig {
function freeRerankConfig (line 47) | func freeRerankConfig(cPtr *C.ml_RerankConfig) {
type RerankerCreateInput (line 57) | type RerankerCreateInput struct
method toCPtr (line 65) | func (rci RerankerCreateInput) toCPtr() *C.ml_RerankerCreateInput {
function freeRerankerCreateInput (line 88) | func freeRerankerCreateInput(cPtr *C.ml_RerankerCreateInput) {
type RerankerRerankInput (line 107) | type RerankerRerankInput struct
method toCPtr (line 113) | func (rri RerankerRerankInput) toCPtr() *C.ml_RerankerRerankInput {
function freeRerankerRerankInput (line 141) | func freeRerankerRerankInput(cPtr *C.ml_RerankerRerankInput) {
type RerankerRerankOutput (line 162) | type RerankerRerankOutput struct
function newRerankerRerankOutputFromCPtr (line 168) | func newRerankerRerankOutputFromCPtr(c *C.ml_RerankerRerankOutput) Reran...
function freeRerankerRerankOutput (line 190) | func freeRerankerRerankOutput(ptr *C.ml_RerankerRerankOutput) {
type Reranker (line 200) | type Reranker struct
method Destroy (line 221) | func (r *Reranker) Destroy() error {
method Rerank (line 237) | func (r *Reranker) Rerank(input RerankerRerankInput) (RerankerRerankOu...
function NewReranker (line 205) | func NewReranker(input RerankerCreateInput) (*Reranker, error) {
FILE: runner/nexa-sdk/tts.go
type TTSConfig (line 28) | type TTSConfig struct
method toCPtr (line 35) | func (tc TTSConfig) toCPtr() *C.ml_TTSConfig {
function freeTTSConfig (line 49) | func freeTTSConfig(cPtr *C.ml_TTSConfig) {
type TTSResult (line 83) | type TTSResult struct
function newTTSResultFromCPtr (line 91) | func newTTSResultFromCPtr(c *C.ml_TTSResult) TTSResult {
function freeTTSResult (line 109) | func freeTTSResult(ptr *C.ml_TTSResult) {
type TtsCreateInput (line 119) | type TtsCreateInput struct
method toCPtr (line 127) | func (tci TtsCreateInput) toCPtr() *C.ml_TtsCreateInput {
function freeTtsCreateInput (line 150) | func freeTtsCreateInput(cPtr *C.ml_TtsCreateInput) {
type TtsSynthesizeInput (line 169) | type TtsSynthesizeInput struct
method toCPtr (line 175) | func (tsi TtsSynthesizeInput) toCPtr() *C.ml_TtsSynthesizeInput {
function freeTtsSynthesizeInput (line 194) | func freeTtsSynthesizeInput(cPtr *C.ml_TtsSynthesizeInput) {
type TtsSynthesizeOutput (line 210) | type TtsSynthesizeOutput struct
function newTtsSynthesizeOutputFromCPtr (line 215) | func newTtsSynthesizeOutputFromCPtr(c *C.ml_TtsSynthesizeOutput) TtsSynt...
function freeTtsSynthesizeOutput (line 227) | func freeTtsSynthesizeOutput(ptr *C.ml_TtsSynthesizeOutput) {
type TtsListAvailableVoicesInput (line 235) | type TtsListAvailableVoicesInput struct
method toCPtr (line 239) | func (tlavi TtsListAvailableVoicesInput) toCPtr() *C.ml_TtsListAvailab...
function freeTtsListAvailableVoicesInput (line 245) | func freeTtsListAvailableVoicesInput(cPtr *C.ml_TtsListAvailableVoicesIn...
type TtsListAvailableVoicesOutput (line 252) | type TtsListAvailableVoicesOutput struct
function newTtsListAvailableVoicesOutputFromCPtr (line 256) | func newTtsListAvailableVoicesOutputFromCPtr(c *C.ml_TtsListAvailableVoi...
function freeTtsListAvailableVoicesOutput (line 268) | func freeTtsListAvailableVoicesOutput(ptr *C.ml_TtsListAvailableVoicesOu...
type TTS (line 278) | type TTS struct
method Destroy (line 299) | func (t *TTS) Destroy() error {
method Synthesize (line 315) | func (t *TTS) Synthesize(input TtsSynthesizeInput) (TtsSynthesizeOutpu...
method ListAvailableVoices (line 334) | func (t *TTS) ListAvailableVoices() (TtsListAvailableVoicesOutput, err...
function NewTTS (line 283) | func NewTTS(input TtsCreateInput) (*TTS, error) {
FILE: runner/nexa-sdk/vlm.go
type VlmCreateInput (line 30) | type VlmCreateInput struct
method toCPtr (line 40) | func (vci VlmCreateInput) toCPtr() *C.ml_VlmCreateInput {
function freeVlmCreateInput (line 83) | func freeVlmCreateInput(cPtr *C.ml_VlmCreateInput) {
type VlmContentType (line 115) | type VlmContentType
constant VlmContentTypeText (line 118) | VlmContentTypeText VlmContentType = "text"
constant VlmContentTypeImage (line 119) | VlmContentTypeImage VlmContentType = "image"
constant VlmContentTypeAudio (line 120) | VlmContentTypeAudio VlmContentType = "audio"
type VlmContent (line 124) | type VlmContent struct
type vlmContents (line 129) | type vlmContents
method toCPtr (line 131) | func (vcs vlmContents) toCPtr() (*C.ml_VlmContent, C.int32_t) {
function freeVlmContents (line 155) | func freeVlmContents(cPtr *C.ml_VlmContent, count C.int64_t) {
type VlmRole (line 173) | type VlmRole
constant VlmRoleUser (line 176) | VlmRoleUser VlmRole = "user"
constant VlmRoleAssistant (line 177) | VlmRoleAssistant VlmRole = "assistant"
constant VlmRoleSystem (line 178) | VlmRoleSystem VlmRole = "system"
type VlmChatMessage (line 182) | type VlmChatMessage struct
type vlmChatMessages (line 187) | type vlmChatMessages
method toCPtr (line 189) | func (vcms vlmChatMessages) toCPtr() (*C.ml_VlmChatMessage, C.int32_t) {
function freeVlmChatMessages (line 212) | func freeVlmChatMessages(cPtr *C.ml_VlmChatMessage, count C.int32_t) {
type VlmApplyChatTemplateInput (line 231) | type VlmApplyChatTemplateInput struct
method toCPtr (line 237) | func (vati VlmApplyChatTemplateInput) toCPtr() *C.ml_VlmApplyChatTempl...
function freeVlmApplyChatTemplateInput (line 256) | func freeVlmApplyChatTemplateInput(cPtr *C.ml_VlmApplyChatTemplateInput) {
type VlmApplyChatTemplateOutput (line 269) | type VlmApplyChatTemplateOutput struct
function newVlmApplyChatTemplateOutputFromCPtr (line 273) | func newVlmApplyChatTemplateOutputFromCPtr(c *C.ml_VlmApplyChatTemplateO...
function freeVlmApplyChatTemplateOutput (line 287) | func freeVlmApplyChatTemplateOutput(cPtr *C.ml_VlmApplyChatTemplateOutpu...
type VlmGenerateInput (line 297) | type VlmGenerateInput struct
method toCPtr (line 303) | func (vgi VlmGenerateInput) toCPtr() *C.ml_VlmGenerateInput {
function freeVlmGenerateInput (line 321) | func freeVlmGenerateInput(cPtr *C.ml_VlmGenerateInput) {
type VlmGenerateOutput (line 336) | type VlmGenerateOutput struct
function newVlmGenerateOutputFromCPtr (line 341) | func newVlmGenerateOutputFromCPtr(c *C.ml_VlmGenerateOutput) VlmGenerate...
function freeVlmGenerateOutput (line 355) | func freeVlmGenerateOutput(ptr *C.ml_VlmGenerateOutput) {
type VLM (line 365) | type VLM struct
method Destroy (line 386) | func (v *VLM) Destroy() error {
method Reset (line 402) | func (v *VLM) Reset() error {
method ApplyChatTemplate (line 417) | func (v *VLM) ApplyChatTemplate(input VlmApplyChatTemplateInput) (*Vlm...
method Generate (line 437) | func (v *VLM) Generate(input VlmGenerateInput) (*VlmGenerateOutput, er...
function NewVLM (line 370) | func NewVLM(input VlmCreateInput) (*VLM, error) {
FILE: runner/server/docs/swagger.go
type embedFileSystem (line 32) | type embedFileSystem struct
method Exists (line 36) | func (e embedFileSystem) Exists(prefix string, path string) bool {
function getSwaggerSubFS (line 44) | func getSwaggerSubFS() fs.FS {
function SwaggerYAMLHandler (line 51) | func SwaggerYAMLHandler() gin.HandlerFunc {
FILE: runner/server/docs/ui/swagger-ui-bundle.js
function getPropType (line 2) | function getPropType(s){var o=typeof s;return Array.isArray(s)?"array":s...
function createChainableTypeChecker (line 2) | function createChainableTypeChecker(s){function checkType(o,i,a,u,_,w){f...
function createIterableSubclassTypeChecker (line 2) | function createIterableSubclassTypeChecker(s,o){return function createIm...
function emptyFunction (line 2) | function emptyFunction(){}
function emptyFunctionWithReset (line 2) | function emptyFunctionWithReset(){}
function shim (line 2) | function shim(s,o,i,u,_,w){if(w!==a){var x=new Error("Calling PropTypes ...
function getShim (line 2) | function getShim(){return shim}
function _defineProperty (line 2) | function _defineProperty(s,o,i){return(o=function _toPropertyKey(s){var ...
function createIterResult (line 2) | function createIterResult(s,o){return{value:s,done:o}}
function readAndResolve (line 2) | function readAndResolve(s){var o=s[w];if(null!==o){var i=s[$].read();nul...
function onReadable (line 2) | function onReadable(s){u.nextTick(readAndResolve,s)}
method stream (line 2) | get stream(){return this[$]}
class Namespace (line 2) | class Namespace{constructor(s){this.elementMap={},this.elementDetection=...
method constructor (line 2) | constructor(s){this.elementMap={},this.elementDetection=[],this.Elemen...
method use (line 2) | use(s){return s.namespace&&s.namespace({base:this}),s.load&&s.load({ba...
method useDefault (line 2) | useDefault(){return this.register("null",j.NullElement).register("stri...
method register (line 2) | register(s,o){return this._elements=void 0,this.elementMap[s]=o,this}
method unregister (line 2) | unregister(s){return this._elements=void 0,delete this.elementMap[s],t...
method detect (line 2) | detect(s,o,i){return void 0===i||i?this.elementDetection.unshift([s,o]...
method toElement (line 2) | toElement(s){if(s instanceof this.Element)return s;let o;for(let i=0;i...
method getElementClass (line 2) | getElementClass(s){const o=this.elementMap[s];return void 0===o?this.E...
method fromRefract (line 2) | fromRefract(s){return this.serialiser.deserialise(s)}
method toRefract (line 2) | toRefract(s){return this.serialiser.serialise(s)}
method elements (line 2) | get elements(){return void 0===this._elements&&(this._elements={Elemen...
method serialiser (line 2) | get serialiser(){return new C(this)}
method constructor (line 2) | constructor(){super(),this.register("annotation",ku),this.register("co...
class ArrayElement (line 2) | class ArrayElement extends u{constructor(s,o,i){super(s||[],o,i),this.el...
method constructor (line 2) | constructor(s,o,i){super(s||[],o,i),this.element="array"}
method primitive (line 2) | primitive(){return"array"}
method get (line 2) | get(s){return this.content[s]}
method getValue (line 2) | getValue(s){const o=this.get(s);if(o)return o.toValue()}
method getIndex (line 2) | getIndex(s){return this.content[s]}
method set (line 2) | set(s,o){return this.content[s]=this.refract(o),this}
method remove (line 2) | remove(s){const o=this.content.splice(s,1);return o.length?o[0]:null}
method map (line 2) | map(s,o){return this.content.map(s,o)}
method flatMap (line 2) | flatMap(s,o){return this.map(s,o).reduce(((s,o)=>s.concat(o)),[])}
method compactMap (line 2) | compactMap(s,o){const i=[];return this.forEach((a=>{const u=s.bind(o)(...
method filter (line 2) | filter(s,o){return new _(this.content.filter(s,o))}
method reject (line 2) | reject(s,o){return this.filter(a(s),o)}
method reduce (line 2) | reduce(s,o){let i,a;void 0!==o?(i=0,a=this.refract(o)):(i=1,a="object"...
method forEach (line 2) | forEach(s,o){this.content.forEach(((i,a)=>{s.bind(o)(i,this.refract(a)...
method shift (line 2) | shift(){return this.content.shift()}
method unshift (line 2) | unshift(s){this.content.unshift(this.refract(s))}
method push (line 2) | push(s){return this.content.push(this.refract(s)),this}
method add (line 2) | add(s){this.push(s)}
method findElements (line 2) | findElements(s,o){const i=o||{},a=!!i.recursive,u=void 0===i.results?[...
method find (line 2) | find(s){return new _(this.findElements(s,{recursive:!0}))}
method findByElement (line 2) | findByElement(s){return this.find((o=>o.element===s))}
method findByClass (line 2) | findByClass(s){return this.find((o=>o.classes.includes(s)))}
method getById (line 2) | getById(s){return this.find((o=>o.id.toValue()===s)).first}
method includes (line 2) | includes(s){return this.content.some((o=>o.equals(s)))}
method contains (line 2) | contains(s){return this.includes(s)}
method empty (line 2) | empty(){return new this.constructor([])}
method "fantasy-land/empty" (line 2) | "fantasy-land/empty"(){return this.empty()}
method concat (line 2) | concat(s){return new this.constructor(this.content.concat(s.content))}
method "fantasy-land/concat" (line 2) | "fantasy-land/concat"(s){return this.concat(s)}
method "fantasy-land/map" (line 2) | "fantasy-land/map"(s){return new this.constructor(this.map(s))}
method "fantasy-land/chain" (line 2) | "fantasy-land/chain"(s){return this.map((o=>s(o)),this).reduce(((s,o)=...
method "fantasy-land/filter" (line 2) | "fantasy-land/filter"(s){return new this.constructor(this.content.filt...
method "fantasy-land/reduce" (line 2) | "fantasy-land/reduce"(s,o){return this.content.reduce(s,o)}
method length (line 2) | get length(){return this.content.length}
method isEmpty (line 2) | get isEmpty(){return 0===this.content.length}
method first (line 2) | get first(){return this.getIndex(0)}
method second (line 2) | get second(){return this.getIndex(1)}
method last (line 2) | get last(){return this.getIndex(this.length-1)}
function _extends (line 2) | function _extends(){var o;return s.exports=_extends=a?u(o=a).call(o):fun...
method constructor (line 2) | constructor(s={}){__publicField(this,"counter"),__publicField(this,"debu...
function createClass (line 2) | function createClass(s,o){o&&(s.prototype=Object.create(o.prototype)),s....
function Iterable (line 2) | function Iterable(s){return isIterable(s)?s:Seq(s)}
function KeyedIterable (line 2) | function KeyedIterable(s){return isKeyed(s)?s:KeyedSeq(s)}
function IndexedIterable (line 2) | function IndexedIterable(s){return isIndexed(s)?s:IndexedSeq(s)}
function SetIterable (line 2) | function SetIterable(s){return isIterable(s)&&!isAssociative(s)?s:SetSeq...
function isIterable (line 2) | function isIterable(s){return!(!s||!s[o])}
function isKeyed (line 2) | function isKeyed(s){return!(!s||!s[i])}
function isIndexed (line 2) | function isIndexed(s){return!(!s||!s[a])}
function isAssociative (line 2) | function isAssociative(s){return isKeyed(s)||isIndexed(s)}
function isOrdered (line 2) | function isOrdered(s){return!(!s||!s[u])}
function MakeRef (line 2) | function MakeRef(s){return s.value=!1,s}
function SetRef (line 2) | function SetRef(s){s&&(s.value=!0)}
function OwnerID (line 2) | function OwnerID(){}
function arrCopy (line 2) | function arrCopy(s,o){o=o||0;for(var i=Math.max(0,s.length-o),a=new Arra...
function ensureSize (line 2) | function ensureSize(s){return void 0===s.size&&(s.size=s.__iterate(retur...
function wrapIndex (line 2) | function wrapIndex(s,o){if("number"!=typeof o){var i=o>>>0;if(""+i!==o||...
function returnTrue (line 2) | function returnTrue(){return!0}
function wholeSlice (line 2) | function wholeSlice(s,o,i){return(0===s||void 0!==i&&s<=-i)&&(void 0===o...
function resolveBegin (line 2) | function resolveBegin(s,o){return resolveIndex(s,o,0)}
function resolveEnd (line 2) | function resolveEnd(s,o){return resolveIndex(s,o,o)}
function resolveIndex (line 2) | function resolveIndex(s,o,i){return void 0===s?i:s<0?Math.max(0,o+s):voi...
function Iterator (line 2) | function Iterator(s){this.next=s}
function iteratorValue (line 2) | function iteratorValue(s,o,i,a){var u=0===s?o:1===s?i:[o,i];return a?a.v...
function iteratorDone (line 2) | function iteratorDone(){return{value:void 0,done:!0}}
function hasIterator (line 2) | function hasIterator(s){return!!getIteratorFn(s)}
function isIterator (line 2) | function isIterator(s){return s&&"function"==typeof s.next}
function getIterator (line 2) | function getIterator(s){var o=getIteratorFn(s);return o&&o.call(s)}
function getIteratorFn (line 2) | function getIteratorFn(s){var o=s&&(z&&s[z]||s[Y]);if("function"==typeof...
function isArrayLike (line 2) | function isArrayLike(s){return s&&"number"==typeof s.length}
function Seq (line 2) | function Seq(s){return null==s?emptySequence():isIterable(s)?s.toSeq():s...
function KeyedSeq (line 2) | function KeyedSeq(s){return null==s?emptySequence().toKeyedSeq():isItera...
function IndexedSeq (line 2) | function IndexedSeq(s){return null==s?emptySequence():isIterable(s)?isKe...
function SetSeq (line 2) | function SetSeq(s){return(null==s?emptySequence():isIterable(s)?isKeyed(...
function ArraySeq (line 2) | function ArraySeq(s){this._array=s,this.size=s.length}
function ObjectSeq (line 2) | function ObjectSeq(s){var o=Object.keys(s);this._object=s,this._keys=o,t...
function IterableSeq (line 2) | function IterableSeq(s){this._iterable=s,this.size=s.length||s.size}
function IteratorSeq (line 2) | function IteratorSeq(s){this._iterator=s,this._iteratorCache=[]}
function isSeq (line 2) | function isSeq(s){return!(!s||!s[ce])}
function emptySequence (line 2) | function emptySequence(){return ee||(ee=new ArraySeq([]))}
function keyedSeqFromValue (line 2) | function keyedSeqFromValue(s){var o=Array.isArray(s)?new ArraySeq(s).fro...
function indexedSeqFromValue (line 2) | function indexedSeqFromValue(s){var o=maybeIndexedSeqFromValue(s);if(!o)...
function seqFromValue (line 2) | function seqFromValue(s){var o=maybeIndexedSeqFromValue(s)||"object"==ty...
function maybeIndexedSeqFromValue (line 2) | function maybeIndexedSeqFromValue(s){return isArrayLike(s)?new ArraySeq(...
function seqIterate (line 2) | function seqIterate(s,o,i,a){var u=s._cache;if(u){for(var _=u.length-1,w...
function seqIterator (line 2) | function seqIterator(s,o,i,a){var u=s._cache;if(u){var _=u.length-1,w=0;...
function fromJS (line 2) | function fromJS(s,o){return o?fromJSWith(o,s,"",{"":s}):fromJSDefault(s)}
function fromJSWith (line 2) | function fromJSWith(s,o,i,a){return Array.isArray(o)?s.call(a,i,IndexedS...
function fromJSDefault (line 2) | function fromJSDefault(s){return Array.isArray(s)?IndexedSeq(s).map(from...
function isPlainObj (line 2) | function isPlainObj(s){return s&&(s.constructor===Object||void 0===s.con...
function is (line 2) | function is(s,o){if(s===o||s!=s&&o!=o)return!0;if(!s||!o)return!1;if("fu...
function deepEqual (line 2) | function deepEqual(s,o){if(s===o)return!0;if(!isIterable(o)||void 0!==s....
function Repeat (line 2) | function Repeat(s,o){if(!(this instanceof Repeat))return new Repeat(s,o)...
function invariant (line 2) | function invariant(s,o){if(!s)throw new Error(o)}
function Range (line 2) | function Range(s,o,i){if(!(this instanceof Range))return new Range(s,o,i...
function Collection (line 2) | function Collection(){throw TypeError("Abstract")}
function KeyedCollection (line 2) | function KeyedCollection(){}
function IndexedCollection (line 2) | function IndexedCollection(){}
function SetCollection (line 2) | function SetCollection(){}
function smi (line 2) | function smi(s){return s>>>1&1073741824|3221225471&s}
function hash (line 2) | function hash(s){if(!1===s||null==s)return 0;if("function"==typeof s.val...
function cachedHashString (line 2) | function cachedHashString(s){var o=Pe[s];return void 0===o&&(o=hashStrin...
function hashString (line 2) | function hashString(s){for(var o=0,i=0;i<s.length;i++)o=31*o+s.charCodeA...
function hashJSObj (line 2) | function hashJSObj(s){var o;if(ye&&void 0!==(o=fe.get(s)))return o;if(vo...
function getIENodeHash (line 2) | function getIENodeHash(s){if(s&&s.nodeType>0)switch(s.nodeType){case 1:r...
function assertNotInfinite (line 2) | function assertNotInfinite(s){invariant(s!==1/0,"Cannot perform this act...
function Map (line 2) | function Map(s){return null==s?emptyMap():isMap(s)&&!isOrdered(s)?s:empt...
function isMap (line 2) | function isMap(s){return!(!s||!s[Re])}
function ArrayMapNode (line 2) | function ArrayMapNode(s,o){this.ownerID=s,this.entries=o}
function BitmapIndexedNode (line 2) | function BitmapIndexedNode(s,o,i){this.ownerID=s,this.bitmap=o,this.node...
function HashArrayMapNode (line 2) | function HashArrayMapNode(s,o,i){this.ownerID=s,this.count=o,this.nodes=i}
function HashCollisionNode (line 2) | function HashCollisionNode(s,o,i){this.ownerID=s,this.keyHash=o,this.ent...
function ValueNode (line 2) | function ValueNode(s,o,i){this.ownerID=s,this.keyHash=o,this.entry=i}
function MapIterator (line 2) | function MapIterator(s,o,i){this._type=o,this._reverse=i,this._stack=s._...
function mapIteratorValue (line 2) | function mapIteratorValue(s,o){return iteratorValue(s,o[0],o[1])}
function mapIteratorFrame (line 2) | function mapIteratorFrame(s,o){return{node:s,index:0,__prev:o}}
function makeMap (line 2) | function makeMap(s,o,i,a){var u=Object.create($e);return u.size=s,u._roo...
function emptyMap (line 2) | function emptyMap(){return Te||(Te=makeMap(0))}
function updateMap (line 2) | function updateMap(s,o,i){var a,u;if(s._root){var _=MakeRef(L),w=MakeRef...
function updateNode (line 2) | function updateNode(s,o,i,a,u,_,w,x){return s?s.update(o,i,a,u,_,w,x):_=...
function isLeafNode (line 2) | function isLeafNode(s){return s.constructor===ValueNode||s.constructor==...
function mergeIntoNode (line 2) | function mergeIntoNode(s,o,i,a,u){if(s.keyHash===a)return new HashCollis...
function createNodes (line 2) | function createNodes(s,o,i,a){s||(s=new OwnerID);for(var u=new ValueNode...
function packNodes (line 2) | function packNodes(s,o,i,a){for(var u=0,_=0,w=new Array(i),x=0,C=1,j=o.l...
function expandNodes (line 2) | function expandNodes(s,o,i,a,u){for(var _=0,w=new Array(x),C=0;0!==i;C++...
function mergeIntoMapWith (line 2) | function mergeIntoMapWith(s,o,i){for(var a=[],u=0;u<i.length;u++){var _=...
function deepMerger (line 2) | function deepMerger(s,o,i){return s&&s.mergeDeep&&isIterable(o)?s.mergeD...
function deepMergerWith (line 2) | function deepMergerWith(s){return function(o,i,a){if(o&&o.mergeDeepWith&...
function mergeIntoCollectionWith (line 2) | function mergeIntoCollectionWith(s,o,i){return 0===(i=i.filter((function...
function updateInDeepMap (line 2) | function updateInDeepMap(s,o,i,a){var u=s===j,_=o.next();if(_.done){var ...
function popCount (line 2) | function popCount(s){return s=(s=(858993459&(s-=s>>1&1431655765))+(s>>2&...
function setIn (line 2) | function setIn(s,o,i,a){var u=a?s:arrCopy(s);return u[o]=i,u}
function spliceIn (line 2) | function spliceIn(s,o,i,a){var u=s.length+1;if(a&&o+1===u)return s[o]=i,...
function spliceOut (line 2) | function spliceOut(s,o,i){var a=s.length-1;if(i&&o===a)return s.pop(),s;...
function List (line 2) | function List(s){var o=emptyList();if(null==s)return o;if(isList(s))retu...
function isList (line 2) | function isList(s){return!(!s||!s[He])}
function VNode (line 2) | function VNode(s,o){this.array=s,this.ownerID=o}
function iterateList (line 2) | function iterateList(s,o){var i=s._origin,a=s._capacity,u=getTailOffset(...
function makeList (line 2) | function makeList(s,o,i,a,u,_,w){var x=Object.create(Ye);return x.size=o...
function emptyList (line 2) | function emptyList(){return Xe||(Xe=makeList(0,0,w))}
function updateList (line 2) | function updateList(s,o,i){if((o=wrapIndex(s,o))!=o)return s;if(o>=s.siz...
function updateVNode (line 2) | function updateVNode(s,o,i,a,u,_){var x,j=a>>>i&C,L=s&&j<s.array.length;...
function editableVNode (line 2) | function editableVNode(s,o){return o&&s&&o===s.ownerID?s:new VNode(s?s.a...
function listNodeFor (line 2) | function listNodeFor(s,o){if(o>=getTailOffset(s._capacity))return s._tai...
function setListBounds (line 2) | function setListBounds(s,o,i){void 0!==o&&(o|=0),void 0!==i&&(i|=0);var ...
function mergeIntoListWith (line 2) | function mergeIntoListWith(s,o,i){for(var a=[],u=0,_=0;_<i.length;_++){v...
function getTailOffset (line 2) | function getTailOffset(s){return s<x?0:s-1>>>w<<w}
function OrderedMap (line 2) | function OrderedMap(s){return null==s?emptyOrderedMap():isOrderedMap(s)?...
function isOrderedMap (line 2) | function isOrderedMap(s){return isMap(s)&&isOrdered(s)}
function makeOrderedMap (line 2) | function makeOrderedMap(s,o,i,a){var u=Object.create(OrderedMap.prototyp...
function emptyOrderedMap (line 2) | function emptyOrderedMap(){return Qe||(Qe=makeOrderedMap(emptyMap(),empt...
function updateOrderedMap (line 2) | function updateOrderedMap(s,o,i){var a,u,_=s._map,w=s._list,C=_.get(o),L...
function ToKeyedSequence (line 2) | function ToKeyedSequence(s,o){this._iter=s,this._useKeys=o,this.size=s.s...
function ToIndexedSequence (line 2) | function ToIndexedSequence(s){this._iter=s,this.size=s.size}
function ToSetSequence (line 2) | function ToSetSequence(s){this._iter=s,this.size=s.size}
function FromEntriesSequence (line 2) | function FromEntriesSequence(s){this._iter=s,this.size=s.size}
function flipFactory (line 2) | function flipFactory(s){var o=makeSequence(s);return o._iter=s,o.size=s....
function mapFactory (line 2) | function mapFactory(s,o,i){var a=makeSequence(s);return a.size=s.size,a....
function reverseFactory (line 2) | function reverseFactory(s,o){var i=makeSequence(s);return i._iter=s,i.si...
function filterFactory (line 2) | function filterFactory(s,o,i,a){var u=makeSequence(s);return a&&(u.has=f...
function countByFactory (line 2) | function countByFactory(s,o,i){var a=Map().asMutable();return s.__iterat...
function groupByFactory (line 2) | function groupByFactory(s,o,i){var a=isKeyed(s),u=(isOrdered(s)?OrderedM...
function sliceFactory (line 2) | function sliceFactory(s,o,i,a){var u=s.size;if(void 0!==o&&(o|=0),void 0...
function takeWhileFactory (line 2) | function takeWhileFactory(s,o,i){var a=makeSequence(s);return a.__iterat...
function skipWhileFactory (line 2) | function skipWhileFactory(s,o,i,a){var u=makeSequence(s);return u.__iter...
function concatFactory (line 2) | function concatFactory(s,o){var i=isKeyed(s),a=[s].concat(o).map((functi...
function flattenFactory (line 2) | function flattenFactory(s,o,i){var a=makeSequence(s);return a.__iterateU...
function flatMapFactory (line 2) | function flatMapFactory(s,o,i){var a=iterableClass(s);return s.toSeq().m...
function interposeFactory (line 2) | function interposeFactory(s,o){var i=makeSequence(s);return i.size=s.siz...
function sortFactory (line 2) | function sortFactory(s,o,i){o||(o=defaultComparator);var a=isKeyed(s),u=...
function maxFactory (line 2) | function maxFactory(s,o,i){if(o||(o=defaultComparator),i){var a=s.toSeq(...
function maxCompare (line 2) | function maxCompare(s,o,i){var a=s(i,o);return 0===a&&i!==o&&(null==i||i...
function zipWithFactory (line 2) | function zipWithFactory(s,o,i){var a=makeSequence(s);return a.size=new A...
function reify (line 2) | function reify(s,o){return isSeq(s)?o:s.constructor(o)}
function validateEntry (line 2) | function validateEntry(s){if(s!==Object(s))throw new TypeError("Expected...
function resolveSize (line 2) | function resolveSize(s){return assertNotInfinite(s.size),ensureSize(s)}
function iterableClass (line 2) | function iterableClass(s){return isKeyed(s)?KeyedIterable:isIndexed(s)?I...
function makeSequence (line 2) | function makeSequence(s){return Object.create((isKeyed(s)?KeyedSeq:isInd...
function cacheResultThrough (line 2) | function cacheResultThrough(){return this._iter.cacheResult?(this._iter....
function defaultComparator (line 2) | function defaultComparator(s,o){return s>o?1:s<o?-1:0}
function forceIterator (line 2) | function forceIterator(s){var o=getIterator(s);if(!o){if(!isArrayLike(s)...
function Record (line 2) | function Record(s,o){var i,a=function Record(_){if(_ instanceof a)return...
function makeRecord (line 2) | function makeRecord(s,o,i){var a=Object.create(Object.getPrototypeOf(s))...
function recordName (line 2) | function recordName(s){return s._name||s.constructor.name||"Record"}
function setProps (line 2) | function setProps(s,o){try{o.forEach(setProp.bind(void 0,s))}catch(s){}}
function setProp (line 2) | function setProp(s,o){Object.defineProperty(s,o,{get:function(){return t...
function Set (line 2) | function Set(s){return null==s?emptySet():isSet(s)&&!isOrdered(s)?s:empt...
function isSet (line 2) | function isSet(s){return!(!s||!s[nt])}
function updateSet (line 2) | function updateSet(s,o){return s.__ownerID?(s.size=o.size,s._map=o,s):o=...
function makeSet (line 2) | function makeSet(s,o){var i=Object.create(st);return i.size=s?s.size:0,i...
function emptySet (line 2) | function emptySet(){return rt||(rt=makeSet(emptyMap()))}
function OrderedSet (line 2) | function OrderedSet(s){return null==s?emptyOrderedSet():isOrderedSet(s)?...
function isOrderedSet (line 2) | function isOrderedSet(s){return isSet(s)&&isOrdered(s)}
function makeOrderedSet (line 2) | function makeOrderedSet(s,o){var i=Object.create(it);return i.size=s?s.s...
function emptyOrderedSet (line 2) | function emptyOrderedSet(){return ot||(ot=makeOrderedSet(emptyOrderedMap...
function Stack (line 2) | function Stack(s){return null==s?emptyStack():isStack(s)?s:emptyStack()....
function isStack (line 2) | function isStack(s){return!(!s||!s[ct])}
function makeStack (line 2) | function makeStack(s,o,i,a){var u=Object.create(lt);return u.size=s,u._h...
function emptyStack (line 2) | function emptyStack(){return at||(at=makeStack(0))}
function mixin (line 2) | function mixin(s,o){var keyCopier=function(i){s.prototype[i]=o[i]};retur...
function keyMapper (line 2) | function keyMapper(s,o){return o}
function entryMapper (line 2) | function entryMapper(s,o){return[o,s]}
function not (line 2) | function not(s){return function(){return!s.apply(this,arguments)}}
function neg (line 2) | function neg(s){return function(){return-s.apply(this,arguments)}}
function quoteString (line 2) | function quoteString(s){return"string"==typeof s?JSON.stringify(s):Strin...
function defaultZipper (line 2) | function defaultZipper(){return arrCopy(arguments)}
function defaultNegComparator (line 2) | function defaultNegComparator(s,o){return s<o?1:s>o?-1:0}
function hashIterable (line 2) | function hashIterable(s){if(s.size===1/0)return 0;var o=isOrdered(s),i=i...
function murmurHashOfSize (line 2) | function murmurHashOfSize(s,o){return o=le(o,3432918353),o=le(o<<15|o>>>...
function hashMerge (line 2) | function hashMerge(s,o){return s^o+2654435769+(s<<6)+(s>>2)}
class Element (line 2) | class Element{constructor(s,o,i){o&&(this.meta=o),i&&(this.attributes=i)...
method constructor (line 2) | constructor(s,o,i){o&&(this.meta=o),i&&(this.attributes=i),this.conten...
method freeze (line 2) | freeze(){Object.isFrozen(this)||(this._meta&&(this.meta.parent=this,th...
method primitive (line 2) | primitive(){}
method clone (line 2) | clone(){const s=new this.constructor;return s.element=this.element,thi...
method toValue (line 2) | toValue(){return this.content instanceof Element?this.content.toValue(...
method toRef (line 2) | toRef(s){if(""===this.id.toValue())throw Error("Cannot create referenc...
method findRecursive (line 2) | findRecursive(...s){if(arguments.length>1&&!this.isFrozen)throw new Er...
method set (line 2) | set(s){return this.content=s,this}
method equals (line 2) | equals(s){return a(this.toValue(),s)}
method getMetaProperty (line 2) | getMetaProperty(s,o){if(!this.meta.hasKey(s)){if(this.isFrozen){const ...
method setMetaProperty (line 2) | setMetaProperty(s,o){this.meta.set(s,o)}
method element (line 2) | get element(){return this._storedElement||"element"}
method element (line 2) | set element(s){this._storedElement=s}
method content (line 2) | get content(){return this._content}
method content (line 2) | set content(s){if(s instanceof Element)this._content=s;else if(s insta...
method meta (line 2) | get meta(){if(!this._meta){if(this.isFrozen){const s=new this.ObjectEl...
method meta (line 2) | set meta(s){s instanceof this.ObjectElement?this._meta=s:this.meta.set...
method attributes (line 2) | get attributes(){if(!this._attributes){if(this.isFrozen){const s=new t...
method attributes (line 2) | set attributes(s){s instanceof this.ObjectElement?this._attributes=s:t...
method id (line 2) | get id(){return this.getMetaProperty("id","")}
method id (line 2) | set id(s){this.setMetaProperty("id",s)}
method classes (line 2) | get classes(){return this.getMetaProperty("classes",[])}
method classes (line 2) | set classes(s){this.setMetaProperty("classes",s)}
method title (line 2) | get title(){return this.getMetaProperty("title","")}
method title (line 2) | set title(s){this.setMetaProperty("title",s)}
method description (line 2) | get description(){return this.getMetaProperty("description","")}
method description (line 2) | set description(s){this.setMetaProperty("description",s)}
method links (line 2) | get links(){return this.getMetaProperty("links",[])}
method links (line 2) | set links(s){this.setMetaProperty("links",s)}
method isFrozen (line 2) | get isFrozen(){return Object.isFrozen(this)}
method parents (line 2) | get parents(){let{parent:s}=this;const o=new _;for(;s;)o.push(s),s=s.p...
method children (line 2) | get children(){if(Array.isArray(this.content))return new _(this.conten...
method recursiveChildren (line 2) | get recursiveChildren(){const s=new _;return this.children.forEach((o=...
class ObjectSlice (line 2) | class ObjectSlice extends u{map(s,o){return this.elements.map((i=>s.bind...
method map (line 2) | map(s,o){return this.elements.map((i=>s.bind(o)(i.value,i.key,i)))}
method filter (line 2) | filter(s,o){return new ObjectSlice(this.elements.filter((i=>s.bind(o)(...
method reject (line 2) | reject(s,o){return this.filter(a(s.bind(o)))}
method forEach (line 2) | forEach(s,o){return this.elements.forEach(((i,a)=>{s.bind(o)(i.value,i...
method keys (line 2) | keys(){return this.map(((s,o)=>o.toValue()))}
method values (line 2) | values(){return this.map((s=>s.toValue()))}
method constructor (line 2) | constructor(s,o,i){super(s,o,i),this.element="boolean"}
method primitive (line 2) | primitive(){return"boolean"}
method constructor (line 2) | constructor(s,o,i){super(s||[],o,i),this.element="ref",this.path||(this....
method path (line 2) | get path(){return this.attributes.get("path")}
method path (line 2) | set path(s){this.attributes.set("path",s)}
function cloneUnlessOtherwiseSpecified (line 2) | function cloneUnlessOtherwiseSpecified(s,o){return!1!==o.clone&&o.isMerg...
function defaultArrayMerge (line 2) | function defaultArrayMerge(s,o,i){return s.concat(o).map((function(s){re...
function getKeys (line 2) | function getKeys(s){return Object.keys(s).concat(function getEnumerableO...
function propertyIsOnObject (line 2) | function propertyIsOnObject(s,o){try{return o in s}catch(s){return!1}}
function mergeObject (line 2) | function mergeObject(s,o,i){var a={};return i.isMergeableObject(s)&&getK...
function deepmerge (line 2) | function deepmerge(s,i,a){(a=a||{}).arrayMerge=a.arrayMerge||defaultArra...
function E (line 2) | function E(s,o,i){this.props=s,this.context=o,this.refs=Y,this.updater=i...
function F (line 2) | function F(){}
function G (line 2) | function G(s,o,i){this.props=s,this.context=o,this.refs=Y,this.updater=i...
function M (line 2) | function M(s,o,a){var u,_={},w=null,x=null;if(null!=o)for(u in void 0!==...
function O (line 2) | function O(s){return"object"==typeof s&&null!==s&&s.$$typeof===i}
function Q (line 2) | function Q(s,o){return"object"==typeof s&&null!==s&&null!=s.key?function...
function R (line 2) | function R(s,o,u,_,w){var x=typeof s;"undefined"!==x&&"boolean"!==x||(s=...
function S (line 2) | function S(s,o,i){if(null==s)return s;var a=[],u=0;return R(s,a,"","",(f...
function T (line 2) | function T(s){if(-1===s._status){var o=s._result;(o=o()).then((function(...
function X (line 2) | function X(){throw Error("act(...) is not supported in production builds...
function CorkedRequest (line 2) | function CorkedRequest(s){var o=this;this.next=null,this.entry=null,this...
function nop (line 2) | function nop(){}
function WritableState (line 2) | function WritableState(s,o,_){a=a||i(25382),s=s||{},"boolean"!=typeof _&...
function Writable (line 2) | function Writable(s){var o=this instanceof(a=a||i(25382));if(!o&&!j.call...
function doWrite (line 2) | function doWrite(s,o,i,a,u,_,w){o.writelen=a,o.writecb=w,o.writing=!0,o....
function afterWrite (line 2) | function afterWrite(s,o,i,a){i||function onwriteDrain(s,o){0===o.length&...
function clearBuffer (line 2) | function clearBuffer(s,o){o.bufferProcessing=!0;var i=o.bufferedRequest;...
function needFinish (line 2) | function needFinish(s){return s.ending&&0===s.length&&null===s.bufferedR...
function callFinal (line 2) | function callFinal(s,o){s._final((function(i){o.pendingcb--,i&&ce(s,i),o...
function finishMaybe (line 2) | function finishMaybe(s,o){var i=needFinish(o);if(i&&(function prefinish(...
function source (line 2) | function source(s){return s?"string"==typeof s?s:s.source:null}
function lookahead (line 2) | function lookahead(s){return concat("(?=",s,")")}
function concat (line 2) | function concat(...s){return s.map((s=>source(s))).join("")}
function either (line 2) | function either(...s){return"("+s.map((s=>source(s))).join("|")+")"}
function resolve (line 2) | function resolve(s,o,i){var a,_=function create_indent(s,o){return new A...
function format (line 2) | function format(s,o,i){if("object"!=typeof o)return s(!1,o);var a=o.inte...
function delay (line 2) | function delay(s){C?a.nextTick(s):s()}
function append (line 2) | function append(s,o){if(void 0!==o&&(u+=o),s&&!w&&(i=i||new _,w=!0),s&&w...
function add (line 2) | function add(s,o){format(append,resolve(s,x,x?1:0),o)}
function end (line 2) | function end(){if(i){var s=u;delay((function(){i.emit("data",s),i.emit("...
function isObject (line 2) | function isObject(s){var o=typeof s;return!!s&&("object"==o||"function"=...
function toNumber (line 2) | function toNumber(s){if("number"==typeof s)return s;if(function isSymbol...
function invokeFunc (line 2) | function invokeFunc(o){var i=a,_=u;return a=u=void 0,j=o,w=s.apply(_,i)}
function shouldInvoke (line 2) | function shouldInvoke(s){var i=s-C;return void 0===C||i>=o||i<0||B&&s-j>=_}
function timerExpired (line 2) | function timerExpired(){var s=now();if(shouldInvoke(s))return trailingEd...
function trailingEdge (line 2) | function trailingEdge(s){return x=void 0,U&&a?invokeFunc(s):(a=u=void 0,w)}
function debounced (line 2) | function debounced(){var s=now(),i=shouldInvoke(s);if(a=arguments,u=this...
class NonError (line 2) | class NonError extends Error{constructor(s){super(NonError._prepareSuper...
method constructor (line 2) | constructor(s){super(NonError._prepareSuperMessage(s)),Object.definePr...
method _prepareSuperMessage (line 2) | static _prepareSuperMessage(s){try{return JSON.stringify(s)}catch{retu...
function Hash (line 2) | function Hash(s){var o=-1,i=null==s?0:s.length;for(this.clear();++o<i;){...
function p (line 2) | function p(s){for(var o="https://reactjs.org/docs/error-decoder.html?inv...
function fa (line 2) | function fa(s,o){ha(s,o),ha(s+"Capture",o)}
function ha (line 2) | function ha(s,o){for(w[s]=o,s=0;s<o.length;s++)_.add(o[s])}
function v (line 2) | function v(s,o,i,a,u,_,w){this.acceptsBooleans=2===o||3===o||4===o,this....
function sa (line 2) | function sa(s){return s[1].toUpperCase()}
function ta (line 2) | function ta(s,o,i,a){var u=$.hasOwnProperty(o)?$[o]:null;(null!==u?0!==u...
function Ka (line 2) | function Ka(s){return null===s||"object"!=typeof s?null:"function"==type...
function Ma (line 2) | function Ma(s){if(void 0===Se)try{throw Error()}catch(s){var o=s.stack.t...
function Oa (line 2) | function Oa(s,o){if(!s||xe)return"";xe=!0;var i=Error.prepareStackTrace;...
function Pa (line 2) | function Pa(s){switch(s.tag){case 5:return Ma(s.type);case 16:return Ma(...
function Qa (line 2) | function Qa(s){if(null==s)return null;if("function"==typeof s)return s.d...
function Ra (line 2) | function Ra(s){var o=s.type;switch(s.tag){case 24:return"Cache";case 9:r...
function Sa (line 2) | function Sa(s){switch(typeof s){case"boolean":case"number":case"string":...
function Ta (line 2) | function Ta(s){var o=s.type;return(s=s.nodeName)&&"input"===s.toLowerCas...
function Va (line 2) | function Va(s){s._valueTracker||(s._valueTracker=function Ua(s){var o=Ta...
function Wa (line 2) | function Wa(s){if(!s)return!1;var o=s._valueTracker;if(!o)return!0;var i...
function Xa (line 2) | function Xa(s){if(void 0===(s=s||("undefined"!=typeof document?document:...
function Ya (line 2) | function Ya(s,o){var i=o.checked;return we({},o,{defaultChecked:void 0,d...
function Za (line 2) | function Za(s,o){var i=null==o.defaultValue?"":o.defaultValue,a=null!=o....
function ab (line 2) | function ab(s,o){null!=(o=o.checked)&&ta(s,"checked",o,!1)}
function bb (line 2) | function bb(s,o){ab(s,o);var i=Sa(o.value),a=o.type;if(null!=i)"number"=...
function db (line 2) | function db(s,o,i){if(o.hasOwnProperty("value")||o.hasOwnProperty("defau...
function cb (line 2) | function cb(s,o,i){"number"===o&&Xa(s.ownerDocument)===s||(null==i?s.def...
function fb (line 2) | function fb(s,o,i,a){if(s=s.options,o){o={};for(var u=0;u<i.length;u++)o...
function gb (line 2) | function gb(s,o){if(null!=o.dangerouslySetInnerHTML)throw Error(p(91));r...
function hb (line 2) | function hb(s,o){var i=o.value;if(null==i){if(i=o.children,o=o.defaultVa...
function ib (line 2) | function ib(s,o){var i=Sa(o.value),a=Sa(o.defaultValue);null!=i&&((i=""+...
function jb (line 2) | function jb(s){var o=s.textContent;o===s._wrapperState.initialValue&&""!...
function kb (line 2) | function kb(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";ca...
function lb (line 2) | function lb(s,o){return null==s||"http://www.w3.org/1999/xhtml"===s?kb(o...
function ob (line 2) | function ob(s,o){if(o){var i=s.firstChild;if(i&&i===s.lastChild&&3===i.n...
function rb (line 2) | function rb(s,o,i){return null==o||"boolean"==typeof o||""===o?"":i||"nu...
function sb (line 2) | function sb(s,o){for(var i in s=s.style,o)if(o.hasOwnProperty(i)){var a=...
function ub (line 2) | function ub(s,o){if(o){if(We[s]&&(null!=o.children||null!=o.dangerouslyS...
function vb (line 2) | function vb(s,o){if(-1===s.indexOf("-"))return"string"==typeof o.is;swit...
function xb (line 2) | function xb(s){return(s=s.target||s.srcElement||window).correspondingUse...
function Bb (line 2) | function Bb(s){if(s=Cb(s)){if("function"!=typeof Ye)throw Error(p(280));...
function Eb (line 2) | function Eb(s){Xe?Qe?Qe.push(s):Qe=[s]:Xe=s}
function Fb (line 2) | function Fb(){if(Xe){var s=Xe,o=Qe;if(Qe=Xe=null,Bb(s),o)for(s=0;s<o.len...
function Gb (line 2) | function Gb(s,o){return s(o)}
function Hb (line 2) | function Hb(){}
function Jb (line 2) | function Jb(s,o,i){if(et)return s(o,i);et=!0;try{return Gb(s,o,i)}finall...
function Kb (line 2) | function Kb(s,o){var i=s.stateNode;if(null===i)return null;var a=Db(i);i...
function Nb (line 2) | function Nb(s,o,i,a,u,_,w,x,C){var j=Array.prototype.slice.call(argument...
function Tb (line 2) | function Tb(s,o,i,a,u,_,w,x,C){nt=!1,st=null,Nb.apply(at,arguments)}
function Vb (line 2) | function Vb(s){var o=s,i=s;if(s.alternate)for(;o.return;)o=o.return;else...
function Wb (line 2) | function Wb(s){if(13===s.tag){var o=s.memoizedState;if(null===o&&(null!=...
function Xb (line 2) | function Xb(s){if(Vb(s)!==s)throw Error(p(188))}
function Zb (line 2) | function Zb(s){return null!==(s=function Yb(s){var o=s.alternate;if(!o){...
function $b (line 2) | function $b(s){if(5===s.tag||6===s.tag)return s;for(s=s.child;null!==s;)...
function tc (line 2) | function tc(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:retur...
function uc (line 2) | function uc(s,o){var i=s.pendingLanes;if(0===i)return 0;var a=0,u=s.susp...
function vc (line 2) | function vc(s,o){switch(s){case 1:case 2:case 4:return o+250;case 8:case...
function xc (line 2) | function xc(s){return 0!==(s=-1073741825&s.pendingLanes)?s:1073741824&s?...
function yc (line 2) | function yc(){var s=kt;return!(4194240&(kt<<=1))&&(kt=64),s}
function zc (line 2) | function zc(s){for(var o=[],i=0;31>i;i++)o.push(s);return o}
function Ac (line 2) | function Ac(s,o,i){s.pendingLanes|=o,536870912!==o&&(s.suspendedLanes=0,...
function Cc (line 2) | function Cc(s,o){var i=s.entangledLanes|=o;for(s=s.entanglements;i;){var...
function Dc (line 2) | function Dc(s){return 1<(s&=-s)?4<s?268435455&s?16:536870912:4:1}
function Sc (line 2) | function Sc(s,o){switch(s){case"focusin":case"focusout":Rt=null;break;ca...
function Tc (line 2) | function Tc(s,o,i,a,u,_){return null===s||s.nativeEvent!==_?(s={blockedO...
function Vc (line 2) | function Vc(s){var o=Wc(s.target);if(null!==o){var i=Vb(o);if(null!==i)i...
function Xc (line 2) | function Xc(s){if(null!==s.blockedOn)return!1;for(var o=s.targetContaine...
function Zc (line 2) | function Zc(s,o,i){Xc(s)&&i.delete(o)}
function $c (line 2) | function $c(){Nt=!1,null!==Rt&&Xc(Rt)&&(Rt=null),null!==Dt&&Xc(Dt)&&(Dt=...
function ad (line 2) | function ad(s,o){s.blockedOn===o&&(s.blockedOn=null,Nt||(Nt=!0,u.unstabl...
function bd (line 2) | function bd(s){function b(o){return ad(o,s)}if(0<Mt.length){ad(Mt[0],s);...
function ed (line 2) | function ed(s,o,i,a){var u=Ct,_=Vt.transition;Vt.transition=null;try{Ct=...
function gd (line 2) | function gd(s,o,i,a){var u=Ct,_=Vt.transition;Vt.transition=null;try{Ct=...
function fd (line 2) | function fd(s,o,i,a){if(Ut){var u=Yc(s,o,i,a);if(null===u)hd(s,o,a,zt,i)...
function Yc (line 2) | function Yc(s,o,i,a){if(zt=null,null!==(s=Wc(s=xb(a))))if(null===(o=Vb(s...
function jd (line 2) | function jd(s){switch(s){case"cancel":case"click":case"close":case"conte...
function nd (line 2) | function nd(){if(Ht)return Ht;var s,o,i=Jt,a=i.length,u="value"in Wt?Wt....
function od (line 2) | function od(s){var o=s.keyCode;return"charCode"in s?0===(s=s.charCode)&&...
function pd (line 2) | function pd(){return!0}
function qd (line 2) | function qd(){return!1}
function rd (line 2) | function rd(s){function b(o,i,a,u,_){for(var w in this._reactName=o,this...
function Pd (line 2) | function Pd(s){var o=this.nativeEvent;return o.getModifierState?o.getMod...
function zd (line 2) | function zd(){return Pd}
function ge (line 2) | function ge(s,o){switch(s){case"keyup":return-1!==Sr.indexOf(o.keyCode);...
function he (line 2) | function he(s){return"object"==typeof(s=s.detail)&&"data"in s?s.data:null}
function me (line 2) | function me(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return"inpu...
function ne (line 2) | function ne(s,o,i,a){Eb(a),0<(o=oe(o,"onChange")).length&&(i=new Qt("onC...
function re (line 2) | function re(s){se(s,0)}
function te (line 2) | function te(s){if(Wa(ue(s)))return s}
function ve (line 2) | function ve(s,o){if("change"===s)return o}
function Ae (line 2) | function Ae(){Ir&&(Ir.detachEvent("onpropertychange",Be),Pr=Ir=null)}
function Be (line 2) | function Be(s){if("value"===s.propertyName&&te(Pr)){var o=[];ne(o,Pr,s,x...
function Ce (line 2) | function Ce(s,o,i){"focusin"===s?(Ae(),Pr=i,(Ir=o).attachEvent("onproper...
function De (line 2) | function De(s){if("selectionchange"===s||"keyup"===s||"keydown"===s)retu...
function Ee (line 2) | function Ee(s,o){if("click"===s)return te(o)}
function Fe (line 2) | function Fe(s,o){if("input"===s||"change"===s)return te(o)}
function Ie (line 2) | function Ie(s,o){if(Dr(s,o))return!0;if("object"!=typeof s||null===s||"o...
function Je (line 2) | function Je(s){for(;s&&s.firstChild;)s=s.firstChild;return s}
function Ke (line 2) | function Ke(s,o){var i,a=Je(s);for(s=0;a;){if(3===a.nodeType){if(i=s+a.t...
function Le (line 2) | function Le(s,o){return!(!s||!o)&&(s===o||(!s||3!==s.nodeType)&&(o&&3===...
function Me (line 2) | function Me(){for(var s=window,o=Xa();o instanceof s.HTMLIFrameElement;)...
function Ne (line 2) | function Ne(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o&&(...
function Oe (line 2) | function Oe(s){var o=Me(),i=s.focusedElem,a=s.selectionRange;if(o!==i&&i...
function Ue (line 2) | function Ue(s,o,i){var a=i.window===i?i.document:9===i.nodeType?i:i.owne...
function Ve (line 2) | function Ve(s,o){var i={};return i[s.toLowerCase()]=o.toLowerCase(),i["W...
function Ze (line 2) | function Ze(s){if(Ur[s])return Ur[s];if(!Vr[s])return s;var o,i=Vr[s];fo...
function ff (line 2) | function ff(s,o){Gr.set(s,o),fa(o,[s])}
function nf (line 2) | function nf(s,o,i){var a=s.type||"unknown-event";s.currentTarget=i,funct...
function se (line 2) | function se(s,o){o=!!(4&o);for(var i=0;i<s.length;i++){var a=s[i],u=a.ev...
function D (line 2) | function D(s,o){var i=o[mn];void 0===i&&(i=o[mn]=new Set);var a=s+"__bub...
function qf (line 2) | function qf(s,o,i){var a=0;o&&(a|=4),pf(i,s,a,o)}
function sf (line 2) | function sf(s){if(!s[tn]){s[tn]=!0,_.forEach((function(o){"selectionchan...
function pf (line 2) | function pf(s,o,i,a){switch(jd(o)){case 1:var u=ed;break;case 4:u=gd;bre...
function hd (line 2) | function hd(s,o,i,a,u){var _=a;if(!(1&o||2&o||null===a))e:for(;;){if(nul...
function tf (line 2) | function tf(s,o,i){return{instance:s,listener:o,currentTarget:i}}
function oe (line 2) | function oe(s,o){for(var i=o+"Capture",a=[];null!==s;){var u=s,_=u.state...
function vf (line 2) | function vf(s){if(null===s)return null;do{s=s.return}while(s&&5!==s.tag)...
function wf (line 2) | function wf(s,o,i,a,u){for(var _=o._reactName,w=[];null!==i&&i!==a;){var...
function zf (line 2) | function zf(s){return("string"==typeof s?s:""+s).replace(rn,"\n").replac...
function Af (line 2) | function Af(s,o,i){if(o=zf(o),zf(s)!==o&&i)throw Error(p(425))}
function Bf (line 2) | function Bf(){}
function Ef (line 2) | function Ef(s,o){return"textarea"===s||"noscript"===s||"string"==typeof ...
function If (line 2) | function If(s){setTimeout((function(){throw s}))}
function Kf (line 2) | function Kf(s,o){var i=o,a=0;do{var u=i.nextSibling;if(s.removeChild(i),...
function Lf (line 2) | function Lf(s){for(;null!=s;s=s.nextSibling){var o=s.nodeType;if(1===o||...
function Mf (line 2) | function Mf(s){s=s.previousSibling;for(var o=0;s;){if(8===s.nodeType){va...
function Wc (line 2) | function Wc(s){var o=s[hn];if(o)return o;for(var i=s.parentNode;i;){if(o...
function Cb (line 2) | function Cb(s){return!(s=s[hn]||s[fn])||5!==s.tag&&6!==s.tag&&13!==s.tag...
function ue (line 2) | function ue(s){if(5===s.tag||6===s.tag)return s.stateNode;throw Error(p(...
function Db (line 2) | function Db(s){return s[dn]||null}
function Uf (line 2) | function Uf(s){return{current:s}}
function E (line 2) | function E(s){0>bn||(s.current=vn[bn],vn[bn]=null,bn--)}
function G (line 2) | function G(s,o){bn++,vn[bn]=s.current,s.current=o}
function Yf (line 2) | function Yf(s,o){var i=s.type.contextTypes;if(!i)return _n;var a=s.state...
function Zf (line 2) | function Zf(s){return null!=(s=s.childContextTypes)}
function $f (line 2) | function $f(){E(En),E(Sn)}
function ag (line 2) | function ag(s,o,i){if(Sn.current!==_n)throw Error(p(168));G(Sn,o),G(En,i)}
function bg (line 2) | function bg(s,o,i){var a=s.stateNode;if(o=o.childContextTypes,"function"...
function cg (line 2) | function cg(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMerged...
function dg (line 2) | function dg(s,o,i){var a=s.stateNode;if(!a)throw Error(p(169));i?(s=bg(s...
function hg (line 2) | function hg(s){null===xn?xn=[s]:xn.push(s)}
function jg (line 2) | function jg(){if(!On&&null!==xn){On=!0;var s=0,o=Ct;try{var i=xn;for(Ct=...
function tg (line 2) | function tg(s,o){Cn[An++]=In,Cn[An++]=jn,jn=s,In=o}
function ug (line 2) | function ug(s,o,i){Pn[Tn++]=Mn,Pn[Tn++]=Rn,Pn[Tn++]=Nn,Nn=s;var a=Mn;s=R...
function vg (line 2) | function vg(s){null!==s.return&&(tg(s,1),ug(s,1,0))}
function wg (line 2) | function wg(s){for(;s===jn;)jn=Cn[--An],Cn[An]=null,In=Cn[--An],Cn[An]=n...
function Ag (line 2) | function Ag(s,o){var i=Bg(5,null,null,0);i.elementType="DELETED",i.state...
function Cg (line 2) | function Cg(s,o){switch(s.tag){case 5:var i=s.type;return null!==(o=1!==...
function Dg (line 2) | function Dg(s){return!(!(1&s.mode)||128&s.flags)}
function Eg (line 2) | function Eg(s){if(Fn){var o=Ln;if(o){var i=o;if(!Cg(s,o)){if(Dg(s))throw...
function Fg (line 2) | function Fg(s){for(s=s.return;null!==s&&5!==s.tag&&3!==s.tag&&13!==s.tag...
function Gg (line 2) | function Gg(s){if(s!==Dn)return!1;if(!Fn)return Fg(s),Fn=!0,!1;var o;if(...
function Hg (line 2) | function Hg(){for(var s=Ln;s;)s=Lf(s.nextSibling)}
function Ig (line 2) | function Ig(){Ln=Dn=null,Fn=!1}
function Jg (line 2) | function Jg(s){null===Bn?Bn=[s]:Bn.push(s)}
function Lg (line 2) | function Lg(s,o,i){if(null!==(s=i.ref)&&"function"!=typeof s&&"object"!=...
function Mg (line 2) | function Mg(s,o){throw s=Object.prototype.toString.call(o),Error(p(31,"[...
function Ng (line 2) | function Ng(s){return(0,s._init)(s._payload)}
function Og (line 2) | function Og(s){function b(o,i){if(s){var a=o.deletions;null===a?(o.delet...
function $g (line 2) | function $g(){Jn=Wn=zn=null}
function ah (line 2) | function ah(s){var o=Un.current;E(Un),s._currentValue=o}
function bh (line 2) | function bh(s,o,i){for(;null!==s;){var a=s.alternate;if((s.childLanes&o)...
function ch (line 2) | function ch(s,o){zn=s,Jn=Wn=null,null!==(s=s.dependencies)&&null!==s.fir...
function eh (line 2) | function eh(s){var o=s._currentValue;if(Jn!==s)if(s={context:s,memoizedV...
function gh (line 2) | function gh(s){null===Hn?Hn=[s]:Hn.push(s)}
function hh (line 2) | function hh(s,o,i,a){var u=o.interleaved;return null===u?(i.next=i,gh(o)...
function ih (line 2) | function ih(s,o){s.lanes|=o;var i=s.alternate;for(null!==i&&(i.lanes|=o)...
function kh (line 2) | function kh(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:...
function lh (line 2) | function lh(s,o){s=s.updateQueue,o.updateQueue===s&&(o.updateQueue={base...
function mh (line 2) | function mh(s,o){return{eventTime:s,lane:o,tag:0,payload:null,callback:n...
function nh (line 2) | function nh(s,o,i){var a=s.updateQueue;if(null===a)return null;if(a=a.sh...
function oh (line 2) | function oh(s,o,i){if(null!==(o=o.updateQueue)&&(o=o.shared,4194240&i)){...
function ph (line 2) | function ph(s,o){var i=s.updateQueue,a=s.alternate;if(null!==a&&i===(a=a...
function qh (line 2) | function qh(s,o,i,a){var u=s.updateQueue;Kn=!1;var _=u.firstBaseUpdate,w...
function sh (line 2) | function sh(s,o,i){if(s=o.effects,o.effects=null,null!==s)for(o=0;o<s.le...
function xh (line 2) | function xh(s){if(s===Gn)throw Error(p(174));return s}
function yh (line 2) | function yh(s,o){switch(G(Qn,o),G(Xn,s),G(Yn,Gn),s=o.nodeType){case 9:ca...
function zh (line 2) | function zh(){E(Yn),E(Xn),E(Qn)}
function Ah (line 2) | function Ah(s){xh(Qn.current);var o=xh(Yn.current),i=lb(o,s.type);o!==i&...
function Bh (line 2) | function Bh(s){Xn.current===s&&(E(Yn),E(Xn))}
function Ch (line 2) | function Ch(s){for(var o=s;null!==o;){if(13===o.tag){var i=o.memoizedSta...
function Eh (line 2) | function Eh(){for(var s=0;s<es.length;s++)es[s]._workInProgressVersionPr...
function P (line 2) | function P(){throw Error(p(321))}
function Mh (line 2) | function Mh(s,o){if(null===o)return!1;for(var i=0;i<o.length&&i<s.length...
function Nh (line 2) | function Nh(s,o,i,a,u,_){if(ns=_,ss=o,o.memoizedState=null,o.updateQueue...
function Sh (line 2) | function Sh(){var s=0!==us;return us=0,s}
function Th (line 2) | function Th(){var s={memoizedState:null,baseState:null,baseQueue:null,qu...
function Uh (line 2) | function Uh(){if(null===os){var s=ss.alternate;s=null!==s?s.memoizedStat...
function Vh (line 2) | function Vh(s,o){return"function"==typeof o?o(s):o}
function Wh (line 2) | function Wh(s){var o=Uh(),i=o.queue;if(null===i)throw Error(p(311));i.la...
function Xh (line 2) | function Xh(s){var o=Uh(),i=o.queue;if(null===i)throw Error(p(311));i.la...
function Yh (line 2) | function Yh(){}
function Zh (line 2) | function Zh(s,o){var i=ss,a=Uh(),u=o(),_=!Dr(a.memoizedState,u);if(_&&(a...
function di (line 2) | function di(s,o,i){s.flags|=16384,s={getSnapshot:o,value:i},null===(o=ss...
function ci (line 2) | function ci(s,o,i,a){o.value=i,o.getSnapshot=a,ei(o)&&fi(s)}
function ai (line 2) | function ai(s,o,i){return i((function(){ei(o)&&fi(s)}))}
function ei (line 2) | function ei(s){var o=s.getSnapshot;s=s.value;try{var i=o();return!Dr(s,i...
function fi (line 2) | function fi(s){var o=ih(s,1);null!==o&&gi(o,s,1,-1)}
function hi (line 2) | function hi(s){var o=Th();return"function"==typeof s&&(s=s()),o.memoized...
function bi (line 2) | function bi(s,o,i,a){return s={tag:s,create:o,destroy:i,deps:a,next:null...
function ji (line 2) | function ji(){return Uh().memoizedState}
function ki (line 2) | function ki(s,o,i,a){var u=Th();ss.flags|=s,u.memoizedState=bi(1|o,i,voi...
function li (line 2) | function li(s,o,i,a){var u=Uh();a=void 0===a?null:a;var _=void 0;if(null...
function mi (line 2) | function mi(s,o){return ki(8390656,8,s,o)}
function $h (line 2) | function $h(s,o){return li(2048,8,s,o)}
function ni (line 2) | function ni(s,o){return li(4,2,s,o)}
function oi (line 2) | function oi(s,o){return li(4,4,s,o)}
function pi (line 2) | function pi(s,o){return"function"==typeof o?(s=s(),o(s),function(){o(nul...
function qi (line 2) | function qi(s,o,i){return i=null!=i?i.concat([s]):null,li(4,4,pi.bind(nu...
function ri (line 2) | function ri(){}
function si (line 2) | function si(s,o){var i=Uh();o=void 0===o?null:o;var a=i.memoizedState;re...
function ti (line 2) | function ti(s,o){var i=Uh();o=void 0===o?null:o;var a=i.memoizedState;re...
function ui (line 2) | function ui(s,o,i){return 21&ns?(Dr(i,o)||(i=yc(),ss.lanes|=i,Ws|=i,s.ba...
function vi (line 2) | function vi(s,o){var i=Ct;Ct=0!==i&&4>i?i:4,s(!0);var a=rs.transition;rs...
function wi (line 2) | function wi(){return Uh().memoizedState}
function xi (line 2) | function xi(s,o,i){var a=yi(s);if(i={lane:a,action:i,hasEagerState:!1,ea...
function ii (line 2) | function ii(s,o,i){var a=yi(s),u={lane:a,action:i,hasEagerState:!1,eager...
function zi (line 2) | function zi(s){var o=s.alternate;return s===ss||null!==o&&o===ss}
function Ai (line 2) | function Ai(s,o){ls=cs=!0;var i=s.pending;null===i?o.next=o:(o.next=i.ne...
function Bi (line 2) | function Bi(s,o,i){if(4194240&i){var a=o.lanes;i|=a&=s.pendingLanes,o.la...
function Ci (line 2) | function Ci(s,o){if(s&&s.defaultProps){for(var i in o=we({},o),s=s.defau...
function Di (line 2) | function Di(s,o,i,a){i=null==(i=i(a,o=s.memoizedState))?o:we({},o,i),s.m...
function Fi (line 2) | function Fi(s,o,i,a,u,_,w){return"function"==typeof(s=s.stateNode).shoul...
function Gi (line 2) | function Gi(s,o,i){var a=!1,u=_n,_=o.contextType;return"object"==typeof ...
function Hi (line 2) | function Hi(s,o,i,a){s=o.state,"function"==typeof o.componentWillReceive...
function Ii (line 2) | function Ii(s,o,i,a){var u=s.stateNode;u.props=i,u.state=s.memoizedState...
function Ji (line 2) | function Ji(s,o){try{var i="",a=o;do{i+=Pa(a),a=a.return}while(a);var u=...
function Ki (line 2) | function Ki(s,o,i){return{value:s,source:null,stack:null!=i?i:null,diges...
function Li (line 2) | function Li(s,o){try{console.error(o.value)}catch(s){setTimeout((functio...
function Ni (line 2) | function Ni(s,o,i){(i=mh(-1,i)).tag=3,i.payload={element:null};var a=o.v...
function Qi (line 2) | function Qi(s,o,i){(i=mh(-1,i)).tag=3;var a=s.type.getDerivedStateFromEr...
function Si (line 2) | function Si(s,o,i){var a=s.pingCache;if(null===a){a=s.pingCache=new ys;v...
function Ui (line 2) | function Ui(s){do{var o;if((o=13===s.tag)&&(o=null===(o=s.memoizedState)...
function Vi (line 2) | function Vi(s,o,i,a,u){return 1&s.mode?(s.flags|=65536,s.lanes=u,s):(s==...
function Xi (line 2) | function Xi(s,o,i,a){o.child=null===s?Vn(o,null,i,a):qn(o,s.child,i,a)}
function Yi (line 2) | function Yi(s,o,i,a,u){i=i.render;var _=o.ref;return ch(o,u),a=Nh(s,o,i,...
function $i (line 2) | function $i(s,o,i,a,u){if(null===s){var _=i.type;return"function"!=typeo...
function bj (line 2) | function bj(s,o,i,a,u){if(null!==s){var _=s.memoizedProps;if(Ie(_,a)&&s....
function dj (line 2) | function dj(s,o,i){var a=o.pendingProps,u=a.children,_=null!==s?s.memoiz...
function gj (line 2) | function gj(s,o){var i=o.ref;(null===s&&null!==i||null!==s&&s.ref!==i)&&...
function cj (line 2) | function cj(s,o,i,a,u){var _=Zf(i)?wn:Sn.current;return _=Yf(o,_),ch(o,u...
function hj (line 2) | function hj(s,o,i,a,u){if(Zf(i)){var _=!0;cg(o)}else _=!1;if(ch(o,u),nul...
function jj (line 2) | function jj(s,o,i,a,u,_){gj(s,o);var w=!!(128&o.flags);if(!a&&!w)return ...
function kj (line 2) | function kj(s){var o=s.stateNode;o.pendingContext?ag(0,o.pendingContext,...
function lj (line 2) | function lj(s,o,i,a,u){return Ig(),Jg(u),o.flags|=256,Xi(s,o,i,a),o.child}
function nj (line 2) | function nj(s){return{baseLanes:s,cachePool:null,transitions:null}}
function oj (line 2) | function oj(s,o,i){var a,u=o.pendingProps,_=Zn.current,w=!1,x=!!(128&o.f...
function qj (line 2) | function qj(s,o){return(o=pj({mode:"visible",children:o},s.mode,0,null))...
function sj (line 2) | function sj(s,o,i,a){return null!==a&&Jg(a),qn(o,s.child,null,i),(s=qj(o...
function vj (line 2) | function vj(s,o,i){s.lanes|=o;var a=s.alternate;null!==a&&(a.lanes|=o),b...
function wj (line 2) | function wj(s,o,i,a,u){var _=s.memoizedState;null===_?s.memoizedState={i...
function xj (line 2) | function xj(s,o,i){var a=o.pendingProps,u=a.revealOrder,_=a.tail;if(Xi(s...
function ij (line 2) | function ij(s,o){!(1&o.mode)&&null!==s&&(s.alternate=null,o.alternate=nu...
function Zi (line 2) | function Zi(s,o,i){if(null!==s&&(o.dependencies=s.dependencies),Ws|=o.la...
function Dj (line 2) | function Dj(s,o){if(!Fn)switch(s.tailMode){case"hidden":o=s.tail;for(var...
function S (line 2) | function S(s){var o=null!==s.alternate&&s.alternate.child===s.child,i=0,...
function Ej (line 2) | function Ej(s,o,i){var a=o.pendingProps;switch(wg(o),o.tag){case 2:case ...
function Ij (line 2) | function Ij(s,o){switch(wg(o),o.tag){case 1:return Zf(o.type)&&$f(),6553...
function Lj (line 2) | function Lj(s,o){var i=s.ref;if(null!==i)if("function"==typeof i)try{i(n...
function Mj (line 2) | function Mj(s,o,i){try{i()}catch(i){W(s,o,i)}}
function Pj (line 2) | function Pj(s,o,i){var a=o.updateQueue;if(null!==(a=null!==a?a.lastEffec...
function Qj (line 2) | function Qj(s,o){if(null!==(o=null!==(o=o.updateQueue)?o.lastEffect:null...
function Rj (line 2) | function Rj(s){var o=s.ref;if(null!==o){var i=s.stateNode;s.tag,s=i,"fun...
function Sj (line 2) | function Sj(s){var o=s.alternate;null!==o&&(s.alternate=null,Sj(o)),s.ch...
function Tj (line 2) | function Tj(s){return 5===s.tag||3===s.tag||4===s.tag}
function Uj (line 2) | function Uj(s){e:for(;;){for(;null===s.sibling;){if(null===s.return||Tj(...
function Vj (line 2) | function Vj(s,o,i){var a=s.tag;if(5===a||6===a)s=s.stateNode,o?8===i.nod...
function Wj (line 2) | function Wj(s,o,i){var a=s.tag;if(5===a||6===a)s=s.stateNode,o?i.insertB...
function Yj (line 2) | function Yj(s,o,i){for(i=i.child;null!==i;)Zj(s,o,i),i=i.sibling}
function Zj (line 2) | function Zj(s,o,i){if(St&&"function"==typeof St.onCommitFiberUnmount)try...
function ak (line 2) | function ak(s){var o=s.updateQueue;if(null!==o){s.updateQueue=null;var i...
function ck (line 2) | function ck(s,o){var i=o.deletions;if(null!==i)for(var a=0;a<i.length;a+...
function dk (line 2) | function dk(s,o){var i=s.alternate,a=s.flags;switch(s.tag){case 0:case 1...
function ek (line 2) | function ek(s){var o=s.flags;if(2&o){try{e:{for(var i=s.return;null!==i;...
function hk (line 2) | function hk(s,o,i){As=s,ik(s,o,i)}
function ik (line 2) | function ik(s,o,i){for(var a=!!(1&s.mode);null!==As;){var u=As,_=u.child...
function kk (line 2) | function kk(s){for(;null!==As;){var o=As;if(8772&o.flags){var i=o.altern...
function gk (line 2) | function gk(s){for(;null!==As;){var o=As;if(o===s){As=null;break}var i=o...
function jk (line 2) | function jk(s){for(;null!==As;){var o=As;try{switch(o.tag){case 0:case 1...
function R (line 2) | function R(){return 6&Ls?ht():-1!==ao?ao:ao=ht()}
function yi (line 2) | function yi(s){return 1&s.mode?2&Ls&&0!==$s?$s&-$s:null!==$n.transition?...
function gi (line 2) | function gi(s,o,i,a){if(50<oo)throw oo=0,io=null,Error(p(185));Ac(s,i,a)...
function Dk (line 2) | function Dk(s,o){var i=s.callbackNode;!function wc(s,o){for(var i=s.susp...
function Gk (line 2) | function Gk(s,o){if(ao=-1,co=0,6&Ls)throw Error(p(327));var i=s.callback...
function Nk (line 2) | function Nk(s,o){var i=Ks;return s.current.memoizedState.isDehydrated&&(...
function Fj (line 2) | function Fj(s){null===Gs?Gs=s:Gs.push.apply(Gs,s)}
function Ck (line 2) | function Ck(s,o){for(o&=~Hs,o&=~Js,s.suspendedLanes|=o,s.pingedLanes&=~o...
function Ek (line 2) | function Ek(s){if(6&Ls)throw Error(p(327));Hk();var o=uc(s,0);if(!(1&o))...
function Qk (line 2) | function Qk(s,o){var i=Ls;Ls|=1;try{return s(o)}finally{0===(Ls=i)&&(Xs=...
function Rk (line 2) | function Rk(s){null!==no&&0===no.tag&&!(6&Ls)&&Hk();var o=Ls;Ls|=1;var i...
function Hj (line 2) | function Hj(){qs=Vs.current,E(Vs)}
function Kk (line 2) | function Kk(s,o){s.finishedWork=null,s.finishedLanes=0;var i=s.timeoutHa...
function Mk (line 2) | function Mk(s,o){for(;;){var i=Bs;try{if($g(),ts.current=hs,cs){for(var ...
function Jk (line 2) | function Jk(){var s=Ms.current;return Ms.current=hs,null===s?hs:s}
function tj (line 2) | function tj(){0!==Us&&3!==Us&&2!==Us||(Us=4),null===Fs||!(268435455&Ws)&...
function Ik (line 2) | function Ik(s,o){var i=Ls;Ls|=2;var a=Jk();for(Fs===s&&$s===o||(Qs=null,...
function Tk (line 2) | function Tk(){for(;null!==Bs;)Uk(Bs)}
function Lk (line 2) | function Lk(){for(;null!==Bs&&!ut();)Uk(Bs)}
function Uk (line 2) | function Uk(s){var o=Ts(s.alternate,s,qs);s.memoizedProps=s.pendingProps...
function Sk (line 2) | function Sk(s){var o=s;do{var i=o.alternate;if(s=o.return,32768&o.flags)...
function Pk (line 2) | function Pk(s,o,i){var a=Ct,u=Ds.transition;try{Ds.transition=null,Ct=1,...
function Hk (line 2) | function Hk(){if(null!==no){var s=Dc(so),o=Ds.transition,i=Ct;try{if(Ds....
function Xk (line 2) | function Xk(s,o,i){s=nh(s,o=Ni(0,o=Ji(i,o),1),1),o=R(),null!==s&&(Ac(s,1...
function W (line 2) | function W(s,o,i){if(3===s.tag)Xk(s,s,i);else for(;null!==o;){if(3===o.t...
function Ti (line 2) | function Ti(s,o,i){var a=s.pingCache;null!==a&&a.delete(o),o=R(),s.pinge...
function Yk (line 2) | function Yk(s,o){0===o&&(1&s.mode?(o=Ot,!(130023424&(Ot<<=1))&&(Ot=41943...
function uj (line 2) | function uj(s){var o=s.memoizedState,i=0;null!==o&&(i=o.retryLane),Yk(s,i)}
function bk (line 2) | function bk(s,o){var i=0;switch(s.tag){case 13:var a=s.stateNode,u=s.mem...
function Fk (line 2) | function Fk(s,o){return ct(s,o)}
function $k (line 2) | function $k(s,o,i,a){this.tag=s,this.key=i,this.sibling=this.child=this....
function Bg (line 2) | function Bg(s,o,i,a){return new $k(s,o,i,a)}
function aj (line 2) | function aj(s){return!(!(s=s.prototype)||!s.isReactComponent)}
function Pg (line 2) | function Pg(s,o){var i=s.alternate;return null===i?((i=Bg(s.tag,o,s.key,...
function Rg (line 2) | function Rg(s,o,i,a,u,_){var w=2;if(a=s,"function"==typeof s)aj(s)&&(w=1...
function Tg (line 2) | function Tg(s,o,i,a){return(s=Bg(7,s,a,o)).lanes=i,s}
function pj (line 2) | function pj(s,o,i,a){return(s=Bg(22,s,a,o)).elementType=be,s.lanes=i,s.s...
function Qg (line 2) | function Qg(s,o,i){return(s=Bg(6,s,null,o)).lanes=i,s}
function Sg (line 2) | function Sg(s,o,i){return(o=Bg(4,null!==s.children?s.children:[],s.key,o...
function al (line 2) | function al(s,o,i,a,u){this.tag=o,this.containerInfo=s,this.finishedWork...
function bl (line 2) | function bl(s,o,i,a,u,_,w,x,C){return s=new al(s,o,i,x,C),1===o?(o=1,!0=...
function dl (line 2) | function dl(s){if(!s)return _n;e:{if(Vb(s=s._reactInternals)!==s||1!==s....
function el (line 2) | function el(s,o,i,a,u,_,w,x,C){return(s=bl(i,a,!0,s,0,_,0,x,C)).context=...
function fl (line 2) | function fl(s,o,i,a){var u=o.current,_=R(),w=yi(u);return i=dl(i),null==...
function gl (line 2) | function gl(s){return(s=s.current).child?(s.child.tag,s.child.stateNode)...
function hl (line 2) | function hl(s,o){if(null!==(s=s.memoizedState)&&null!==s.dehydrated){var...
function il (line 2) | function il(s,o){hl(s,o),(s=s.alternate)&&hl(s,o)}
function ll (line 2) | function ll(s){this._internalRoot=s}
function ml (line 2) | function ml(s){this._internalRoot=s}
function nl (line 2) | function nl(s){return!(!s||1!==s.nodeType&&9!==s.nodeType&&11!==s.nodeTy...
function ol (line 2) | function ol(s){return!(!s||1!==s.nodeType&&9!==s.nodeType&&11!==s.nodeTy...
function pl (line 2) | function pl(){}
function rl (line 2) | function rl(s,o,i,a,u){var _=i._reactRootContainer;if(_){var w=_;if("fun...
function Sha256 (line 2) | function Sha256(){this.init(),this._w=x,u.call(this,64,56)}
function ch (line 2) | function ch(s,o,i){return i^s&(o^i)}
function maj (line 2) | function maj(s,o,i){return s&o|i&(s|o)}
function sigma0 (line 2) | function sigma0(s){return(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10)}
function sigma1 (line 2) | function sigma1(s){return(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7)}
function gamma0 (line 2) | function gamma0(s){return(s>>>7|s<<25)^(s>>>18|s<<14)^s>>>3}
function _typeof (line 2) | function _typeof(s){return _typeof="function"==typeof Symbol&&"symbol"==...
function _interopRequireDefault (line 2) | function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}
function ownKeys (line 2) | function ownKeys(s,o){var i=Object.keys(s);if(Object.getOwnPropertySymbo...
function _objectSpread (line 2) | function _objectSpread(s){for(var o=1;o<arguments.length;o++){var i=null...
function _objectWithoutProperties (line 2) | function _objectWithoutProperties(s,o){if(null==s)return{};var i,a,u=fun...
function _defineProperties (line 2) | function _defineProperties(s,o){for(var i=0;i<o.length;i++){var a=o[i];a...
function _setPrototypeOf (line 2) | function _setPrototypeOf(s,o){return _setPrototypeOf=Object.setPrototype...
function _createSuper (line 2) | function _createSuper(s){var o=function _isNativeReflectConstruct(){if("...
function _assertThisInitialized (line 2) | function _assertThisInitialized(s){if(void 0===s)throw new ReferenceErro...
function _getPrototypeOf (line 2) | function _getPrototypeOf(s){return _getPrototypeOf=Object.setPrototypeOf...
function _defineProperty (line 2) | function _defineProperty(s,o,i){return o in s?Object.defineProperty(s,o,...
function CopyToClipboard (line 2) | function CopyToClipboard(){var s;!function _classCallCheck(s,o){if(!(s i...
function Duplex (line 2) | function Duplex(s){if(!(this instanceof Duplex))return new Duplex(s);_.c...
function onend (line 2) | function onend(){this._writableState.ended||a.nextTick(onEndNT,this)}
function onEndNT (line 2) | function onEndNT(s){s.end()}
function format (line 2) | function format(s){for(var o,i,a,u,_=1,w=[].slice.call(arguments),x=0,C=...
function getType (line 2) | function getType(s){return u(s)?"ClosingTag":function isOpeningTag(s){re...
function Sha224 (line 2) | function Sha224(){this.init(),this._w=x,_.call(this,64,56)}
function Sha (line 2) | function Sha(){this.init(),this._w=x,u.call(this,64,56)}
function rotl30 (line 2) | function rotl30(s){return s<<30|s>>>2}
function ft (line 2) | function ft(s,o,i,a){return 0===s?o&i|~o&a:2===s?o&i|o&a|i&a:o^i^a}
function f (line 2) | function f(s,o){var i=s.length;s.push(o);e:for(;0<i;){var a=i-1>>>1,u=s[...
function h (line 2) | function h(s){return 0===s.length?null:s[0]}
function k (line 2) | function k(s){if(0===s.length)return null;var o=s[0],i=s.pop();if(i!==o)...
function g (line 2) | function g(s,o){var i=s.sortIndex-o.sortIndex;return 0!==i?i:s.id-o.id}
function G (line 2) | function G(s){for(var o=h(w);null!==o;){if(null===o.callback)k(w);else{i...
function H (line 2) | function H(s){if($=!1,G(s),!B)if(null!==h(_))B=!0,I(J);else{var o=h(w);n...
function J (line 2) | function J(s,i){B=!1,$&&($=!1,U(ie),ie=-1),L=!0;var a=j;try{for(G(i),C=h...
function M (line 2) | function M(){return!(o.unstable_now()-ce<ae)}
function R (line 2) | function R(){if(null!==ee){var s=o.unstable_now();ce=s;var i=!0;try{i=ee...
function I (line 2) | function I(s){ee=s,Z||(Z=!0,Y())}
function K (line 2) | function K(s,i){ie=V((function(){s(o.unstable_now())}),i)}
function LazyWrapper (line 2) | function LazyWrapper(s){this.__wrapped__=s,this.__actions__=[],this.__di...
function Sha384 (line 2) | function Sha384(){this.init(),this._w=x,_.call(this,128,112)}
function writeInt64BE (line 2) | function writeInt64BE(o,i,a){s.writeInt32BE(o,a),s.writeInt32BE(i,a+4)}
function concat (line 2) | function concat(...s){return s.map((s=>function source(s){return s?"stri...
function EventEmitter (line 2) | function EventEmitter(){EventEmitter.init.call(this)}
function errorListener (line 2) | function errorListener(i){s.removeListener(o,resolver),a(i)}
function resolver (line 2) | function resolver(){"function"==typeof s.removeListener&&s.removeListene...
function checkListener (line 2) | function checkListener(s){if("function"!=typeof s)throw new TypeError('T...
function _getMaxListeners (line 2) | function _getMaxListeners(s){return void 0===s._maxListeners?EventEmitte...
function _addListener (line 2) | function _addListener(s,o,i,a){var u,_,w;if(checkListener(i),void 0===(_...
function onceWrapper (line 2) | function onceWrapper(){if(!this.fired)return this.target.removeListener(...
function _onceWrap (line 2) | function _onceWrap(s,o,i){var a={fired:!1,wrapFn:void 0,target:s,type:o,...
function _listeners (line 2) | function _listeners(s,o,i){var a=s._events;if(void 0===a)return[];var u=...
function listenerCount (line 2) | function listenerCount(s){var o=this._events;if(void 0!==o){var i=o[s];i...
function arrayClone (line 2) | function arrayClone(s,o){for(var i=new Array(o),a=0;a<o;++a)i[a]=s[a];re...
function eventTargetAgnosticAddListener (line 2) | function eventTargetAgnosticAddListener(s,o,i,a){if("function"==typeof s...
function Stack (line 2) | function Stack(s){var o=this.__data__=new a(s);this.size=o.size}
function invokeFunc (line 2) | function invokeFunc(o){var i=C,a=j;return C=j=void 0,U=o,B=s.apply(a,i)}
function shouldInvoke (line 2) | function shouldInvoke(s){var i=s-V;return void 0===V||i>=o||i<0||Y&&s-U>=L}
function timerExpired (line 2) | function timerExpired(){var s=u();if(shouldInvoke(s))return trailingEdge...
function trailingEdge (line 2) | function trailingEdge(s){return $=void 0,Z&&C?invokeFunc(s):(C=j=void 0,B)}
function debounced (line 2) | function debounced(){var s=u(),i=shouldInvoke(s);if(C=arguments,j=this,V...
function SetCache (line 2) | function SetCache(s){var o=-1,i=null==s?0:s.length;for(this.__data__=new...
function object (line 2) | function object(){}
method constructor (line 2) | constructor(s,o,i){super(s,o,i),this.element="number"}
method primitive (line 2) | primitive(){return"number"}
method constructor (line 2) | constructor(s,o,i){super(s||null,o,i),this.element="null"}
method primitive (line 2) | primitive(){return"null"}
method set (line 2) | set(){return new Error("Cannot set the value of null")}
method constructor (line 2) | constructor(s,o){if(this._setDefaults(s),s instanceof RegExp)this.ignore...
method _setDefaults (line 2) | _setDefaults(s){this.max=null!=s.max?s.max:null!=RandExp.prototype.max?R...
method gen (line 2) | gen(){return this._gen(this.tokens,[])}
method _gen (line 2) | _gen(s,o){var i,a,u,w,x;switch(s.type){case _.ROOT:case _.GROUP:if(s.fol...
method _toOtherCase (line 2) | _toOtherCase(s){return s+(97<=s&&s<=122?-32:65<=s&&s<=90?32:0)}
method _randBool (line 2) | _randBool(){return!this.randInt(0,1)}
method _randSelect (line 2) | _randSelect(s){return s instanceof u?s.index(this.randInt(0,s.length-1))...
method _expand (line 2) | _expand(s){if(s.type===a.types.CHAR)return new u(s.value);if(s.type===a....
method randInt (line 2) | randInt(s,o){return s+Math.floor(Math.random()*(1+o-s))}
method defaultRange (line 2) | get defaultRange(){return this._range=this._range||new u(32,126)}
method defaultRange (line 2) | set defaultRange(s){this._range=s}
method randexp (line 2) | static randexp(s,o){var i;return"string"==typeof s&&(s=new RegExp(s,o)),...
method sugar (line 2) | static sugar(){RegExp.prototype.gen=function(){return RandExp.randexp(th...
function highlight (line 2) | function highlight(s,o,i){var w,x=a.configure({}),C=(i||{}).prefix;if("s...
function Emitter (line 2) | function Emitter(s){this.options=s,this.rootNode={children:[]},this.stac...
function noop (line 2) | function noop(){}
function ReadableState (line 2) | function ReadableState(s,o,u){a=a||i(25382),s=s||{},"boolean"!=typeof u&...
function Readable (line 2) | function Readable(s){if(a=a||i(25382),!(this instanceof Readable))return...
function readableAddChunk (line 2) | function readableAddChunk(s,o,i,a,u){j("readableAddChunk",o);var _,w=s._...
function addChunk (line 2) | function addChunk(s,o,i,a){o.flowing&&0===o.length&&!o.sync?(o.awaitDrai...
function howMuchToRead (line 2) | function howMuchToRead(s,o){return s<=0||0===o.length&&o.ended?0:o.objec...
function emitReadable (line 2) | function emitReadable(s){var o=s._readableState;j("emitReadable",o.needR...
function emitReadable_ (line 2) | function emitReadable_(s){var o=s._readableState;j("emitReadable_",o.des...
function maybeReadMore (line 2) | function maybeReadMore(s,o){o.readingMore||(o.readingMore=!0,u.nextTick(...
function maybeReadMore_ (line 2) | function maybeReadMore_(s,o){for(;!o.reading&&!o.ended&&(o.length<o.high...
function updateReadableListening (line 2) | function updateReadableListening(s){var o=s._readableState;o.readableLis...
function nReadingNextTick (line 2) | function nReadingNextTick(s){j("readable nexttick read 0"),s.read(0)}
function resume_ (line 2) | function resume_(s,o){j("resume",o.reading),o.reading||s.read(0),o.resum...
function flow (line 2) | function flow(s){var o=s._readableState;for(j("flow",o.flowing);o.flowin...
function fromList (line 2) | function fromList(s,o){return 0===o.length?null:(o.objectMode?i=o.buffer...
function endReadable (line 2) | function endReadable(s){var o=s._readableState;j("endReadable",o.endEmit...
function endReadableNT (line 2) | function endReadableNT(s,o){if(j("endReadableNT",s.endEmitted,s.length),...
function indexOf (line 2) | function indexOf(s,o){for(var i=0,a=s.length;i<a;i++)if(s[i]===o)return ...
function onunpipe (line 2) | function onunpipe(o,u){j("onunpipe"),o===i&&u&&!1===u.hasUnpiped&&(u.has...
function onend (line 2) | function onend(){j("onend"),s.end()}
function ondata (line 2) | function ondata(o){j("ondata");var u=s.write(o);j("dest.write",u),!1===u...
function onerror (line 2) | function onerror(o){j("onerror",o),unpipe(),s.removeListener("error",one...
function onclose (line 2) | function onclose(){s.removeListener("finish",onfinish),unpipe()}
function onfinish (line 2) | function onfinish(){j("onfinish"),s.removeListener("close",onclose),unpi...
function unpipe (line 2) | function unpipe(){j("unpipe"),i.unpipe(s)}
function deepFreeze (line 2) | function deepFreeze(s){return s instanceof Map?s.clear=s.delete=s.set=fu...
class Response (line 2) | class Response{constructor(s){void 0===s.data&&(s.data={}),this.data=s.d...
method constructor (line 2) | constructor(s){void 0===s.data&&(s.data={}),this.data=s.data,this.isMa...
method ignoreMatch (line 2) | ignoreMatch(){this.isMatchIgnored=!0}
function escapeHTML (line 2) | function escapeHTML(s){return s.replace(/&/g,"&").replace(/</g,"<...
function inherit (line 2) | function inherit(s,...o){const i=Object.create(null);for(const o in s)i[...
class HTMLRenderer (line 2) | class HTMLRenderer{constructor(s,o){this.buffer="",this.classPrefix=o.cl...
method constructor (line 2) | constructor(s,o){this.buffer="",this.classPrefix=o.classPrefix,s.walk(...
method addText (line 2) | addText(s){this.buffer+=escapeHTML(s)}
method openNode (line 2) | openNode(s){if(!emitsWrappingTags(s))return;let o=s.kind;s.sublanguage...
method closeNode (line 2) | closeNode(s){emitsWrappingTags(s)&&(this.buffer+="</span>")}
method value (line 2) | value(){return this.buffer}
method span (line 2) | span(s){this.buffer+=`<span class="${s}">`}
class TokenTree (line 2) | class TokenTree{constructor(){this.rootNode={children:[]},this.stack=[th...
method constructor (line 2) | constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}
method top (line 2) | get top(){return this.stack[this.stack.length-1]}
method root (line 2) | get root(){return this.rootNode}
method add (line 2) | add(s){this.top.children.push(s)}
method openNode (line 2) | openNode(s){const o={kind:s,children:[]};this.add(o),this.stack.push(o)}
method closeNode (line 2) | closeNode(){if(this.stack.length>1)return this.stack.pop()}
method closeAllNodes (line 2) | closeAllNodes(){for(;this.closeNode(););}
method toJSON (line 2) | toJSON(){return JSON.stringify(this.rootNode,null,4)}
method walk (line 2) | walk(s){return this.constructor._walk(s,this.rootNode)}
method _walk (line 2) | static _walk(s,o){return"string"==typeof o?s.addText(o):o.children&&(s...
method _collapse (line 2) | static _collapse(s){"string"!=typeof s&&s.children&&(s.children.every(...
class TokenTreeEmitter (line 2) | class TokenTreeEmitter extends TokenTree{constructor(s){super(),this.opt...
method constructor (line 2) | constructor(s){super(),this.options=s}
method addKeyword (line 2) | addKeyword(s,o){""!==s&&(this.openNode(o),this.addText(s),this.closeNo...
method addText (line 2) | addText(s){""!==s&&this.add(s)}
method addSublanguage (line 2) | addSublanguage(s,o){const i=s.root;i.kind=o,i.sublanguage=!0,this.add(i)}
method toHTML (line 2) | toHTML(){return new HTMLRenderer(this,this.options).value()}
method finalize (line 2) | finalize(){return!0}
function source (line 2) | function source(s){return s?"string"==typeof s?s:s.source:null}
function skipIfhasPrecedingDot (line 2) | function skipIfhasPrecedingDot(s,o){"."===s.input[s.index-1]&&o.ignoreMa...
function beginKeywords (line 2) | function beginKeywords(s,o){o&&s.beginKeywords&&(s.begin="\\b("+s.beginK...
function compileIllegal (line 2) | function compileIllegal(s,o){Array.isArray(s.illegal)&&(s.illegal=functi...
function compileMatch (line 2) | function compileMatch(s,o){if(s.match){if(s.begin||s.end)throw new Error...
function compileRelevance (line 2) | function compileRelevance(s,o){void 0===s.relevance&&(s.relevance=1)}
function compileKeywords (line 2) | function compileKeywords(s,o,i="keyword"){const a={};return"string"==typ...
function scoreForKeyword (line 2) | function scoreForKeyword(s,o){return o?Number(o):function commonKeyword(...
function compileLanguage (line 2) | function compileLanguage(s,{plugins:o}){function langRe(o,i){return new ...
function dependencyOnParent (line 2) | function dependencyOnParent(s){return!!s&&(s.endsWithParent||dependencyO...
function BuildVuePlugin (line 2) | function BuildVuePlugin(s){const o={props:["language","code","autodetect...
function selectStream (line 2) | function selectStream(){return s.length&&o.length?s[0].offset!==o[0].off...
function open (line 2) | function open(s){function attributeString(s){return" "+s.nodeName+'="'+e...
function close (line 2) | function close(s){u+="</"+tag(s)+">"}
function render (line 2) | function render(s){("start"===s.event?open:close)(s.node)}
function tag (line 2) | function tag(s){return s.nodeName.toLowerCase()}
function nodeStream (line 2) | function nodeStream(s){const o=[];return function _nodeStream(s,i){for(l...
function shouldNotHighlight (line 2) | function shouldNotHighlight(s){return j.noHighlightRe.test(s)}
function highlight (line 2) | function highlight(s,o,i,a){let u="",_="";"object"==typeof o?(u=s,i=o.ig...
function _highlight (line 2) | function _highlight(s,o,a,w){function keywordData(s,o){const i=L.case_in...
function highlightAuto (line 2) | function highlightAuto(s,o){o=o||j.languages||Object.keys(i);const a=fun...
function highlightElement (line 2) | function highlightElement(s){let o=null;const i=function blockLanguage(s...
function highlightAll (line 2) | function highlightAll(){if("loading"===document.readyState)return void(V...
function getLanguage (line 2) | function getLanguage(s){return s=(s||"").toLowerCase(),i[s]||i[a[s]]}
function registerAliases (line 2) | function registerAliases(s,{languageName:o}){"string"==typeof s&&(s=[s])...
function autoDetection (line 2) | function autoDetection(s){const o=getLanguage(s);return o&&!o.disableAut...
function fire (line 2) | function fire(s,o){const i=s;u.forEach((function(s){s[i]&&s[i](o)}))}
function classNames (line 2) | function classNames(){for(var s="",o=0;o<arguments.length;o++){var i=arg...
function parseValue (line 2) | function parseValue(s){if("string"==typeof s||"number"==typeof s)return ...
function appendClass (line 2) | function appendClass(s,o){return o?s?s+" "+o:s+o:s}
function createBuffer (line 2) | function createBuffer(s){if(s>w)throw new RangeError('The value "'+s+'" ...
function Buffer (line 2) | function Buffer(s,o,i){if("number"==typeof s){if("string"==typeof o)thro...
function from (line 2) | function from(s,o,i){if("string"==typeof s)return function fromString(s,...
function assertSize (line 2) | function assertSize(s){if("number"!=typeof s)throw new TypeError('"size"...
function allocUnsafe (line 2) | function allocUnsafe(s){return assertSize(s),createBuffer(s<0?0:0|checke...
function fromArrayLike (line 2) | function fromArrayLike(s){const o=s.length<0?0:0|checked(s.length),i=cre...
function fromArrayBuffer (line 2) | function fromArrayBuffer(s,o,i){if(o<0||s.byteLength<o)throw new RangeEr...
function checked (line 2) | function checked(s){if(s>=w)throw new RangeError("Attempt to allocate Bu...
function byteLength (line 2) | function byteLength(s,o){if(Buffer.isBuffer(s))return s.length;if(ArrayB...
function slowToString (line 2) | function slowToString(s,o,i){let a=!1;if((void 0===o||o<0)&&(o=0),o>this...
function swap (line 2) | function swap(s,o,i){const a=s[o];s[o]=s[i],s[i]=a}
function bidirectionalIndexOf (line 2) | function bidirectionalIndexOf(s,o,i,a,u){if(0===s.length)return-1;if("st...
function arrayIndexOf (line 2) | function arrayIndexOf(s,o,i,a,u){let _,w=1,x=s.length,C=o.length;if(void...
function hexWrite (line 2) | function hexWrite(s,o,i,a){i=Number(i)||0;const u=s.length-i;a?(a=Number...
function utf8Write (line 2) | function utf8Write(s,o,i,a){return blitBuffer(utf8ToBytes(o,s.length-i),...
function asciiWrite (line 2) | function asciiWrite(s,o,i,a){return blitBuffer(function asciiToBytes(s){...
function base64Write (line 2) | function base64Write(s,o,i,a){return blitBuffer(base64ToBytes(o),s,i,a)}
function ucs2Write (line 2) | function ucs2Write(s,o,i,a){return blitBuffer(function utf16leToBytes(s,...
function base64Slice (line 2) | function base64Slice(s,o,i){return 0===o&&i===s.length?a.fromByteArray(s...
function utf8Slice (line 2) | function utf8Slice(s,o,i){i=Math.min(s.length,i);const a=[];let u=o;for(...
function asciiSlice (line 2) | function asciiSlice(s,o,i){let a="";i=Math.min(s.length,i);for(let u=o;u...
function latin1Slice (line 2) | function latin1Slice(s,o,i){let a="";i=Math.min(s.length,i);for(let u=o;...
function hexSlice (line 2) | function hexSlice(s,o,i){const a=s.length;(!o||o<0)&&(o=0),(!i||i<0||i>a...
function utf16leSlice (line 2) | function utf16leSlice(s,o,i){const a=s.slice(o,i);let u="";for(let s=0;s...
function checkOffset (line 2) | function checkOffset(s,o,i){if(s%1!=0||s<0)throw new RangeError("offset ...
function checkInt (line 2) | function checkInt(s,o,i,a,u,_){if(!Buffer.isBuffer(s))throw new TypeErro...
function wrtBigUInt64LE (line 2) | function wrtBigUInt64LE(s,o,i,a,u){checkIntBI(o,a,u,s,i,7);let _=Number(...
function wrtBigUInt64BE (line 2) | function wrtBigUInt64BE(s,o,i,a,u){checkIntBI(o,a,u,s,i,7);let _=Number(...
function checkIEEE754 (line 2) | function checkIEEE754(s,o,i,a,u,_){if(i+a>s.length)throw new RangeError(...
function writeFloat (line 2) | function writeFloat(s,o,i,a,_){return o=+o,i>>>=0,_||checkIEEE754(s,0,i,...
function writeDouble (line 2) | function writeDouble(s,o,i,a,_){return o=+o,i>>>=0,_||checkIEEE754(s,0,i...
function E (line 2) | function E(s,o,i){C[s]=class NodeError extends i{constructor(){super(),O...
function addNumericalSeparator (line 2) | function addNumericalSeparator(s){let o="",i=s.length;const a="-"===s[0]...
function checkIntBI (line 2) | function checkIntBI(s,o,i,a,u,_){if(s>i||s<o){const a="bigint"==typeof o...
function validateNumber (line 2) | function validateNumber(s,o){if("number"!=typeof s)throw new C.ERR_INVAL...
function boundsError (line 2) | function boundsError(s,o,i){if(Math.floor(s)!==s)throw validateNumber(s,...
function utf8ToBytes (line 2) | function utf8ToBytes(s,o){let i;o=o||1/0;const a=s.length;let u=null;con...
function base64ToBytes (line 2) | function base64ToBytes(s){return a.toByteArray(function base64clean(s){i...
function blitBuffer (line 2) | function blitBuffer(s,o,i,a){let u;for(u=0;u<a&&!(u+i>=o.length||u>=s.le...
function isInstance (line 2) | function isInstance(s,o){return s instanceof o||null!=s&&null!=s.constru...
function numberIsNaN (line 2) | function numberIsNaN(s){return s!=s}
function defineBigIntMethod (line 2) | function defineBigIntMethod(s){return"undefined"==typeof BigInt?BufferBi...
function BufferBigIntNotDefined (line 2) | function BufferBigIntNotDefined(){throw new Error("BigInt not supported")}
function curry (line 2) | function curry(s,o,i){var u=a(s,8,void 0,void 0,void 0,void 0,void 0,o=i...
function memoize (line 2) | function memoize(s,o){if("function"!=typeof s||null!=o&&"function"!=type...
function MapCache (line 2) | function MapCache(s){var o=-1,i=null==s?0:s.length;for(this.clear();++o<...
function lodash (line 2) | function lodash(s){if(x(s)&&!w(s)&&!(s instanceof a)){if(s instanceof u)...
function _interopRequireDefault (line 2) | function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}
class KeyValuePair (line 2) | class KeyValuePair{constructor(s,o){this.key=s,this.value=o}clone(){cons...
method constructor (line 2) | constructor(s,o){this.key=s,this.value=o}
method clone (line 2) | clone(){const s=new KeyValuePair;return this.key&&(s.key=this.key.clon...
function LodashWrapper (line 2) | function LodashWrapper(s,o){this.__wrapped__=s,this.__actions__=[],this....
function F (line 2) | function F(){}
function noop (line 2) | function noop(s){if(s)throw s}
function call (line 2) | function call(s){s()}
function pipe (line 2) | function pipe(s,o){return s.pipe(o)}
method constructor (line 2) | constructor(s,o,i){super(s||[],o,i),this.element="object"}
method primitive (line 2) | primitive(){return"object"}
method toValue (line 2) | toValue(){return this.content.reduce(((s,o)=>(s[o.key.toValue()]=o.value...
method get (line 2) | get(s){const o=this.getMember(s);if(o)return o.value}
method getMember (line 2) | getMember(s){if(void 0!==s)return this.content.find((o=>o.key.toValue()=...
method remove (line 2) | remove(s){let o=null;return this.content=this.content.filter((i=>i.key.t...
method getKey (line 2) | getKey(s){const o=this.getMember(s);if(o)return o.key}
method set (line 2) | set(s,o){if(u(s))return Object.keys(s).forEach((o=>{this.set(o,s[o])})),...
method keys (line 2) | keys(){return this.content.map((s=>s.key.toValue()))}
method values (line 2) | values(){return this.content.map((s=>s.value.toValue()))}
method hasKey (line 2) | hasKey(s){return this.content.some((o=>o.key.equals(s)))}
method items (line 2) | items(){return this.content.map((s=>[s.key.toValue(),s.value.toValue()]))}
method map (line 2) | map(s,o){return this.content.map((i=>s.bind(o)(i.value,i.key,i)))}
method compactMap (line 2) | compactMap(s,o){const i=[];return this.forEach(((a,u,_)=>{const w=s.bind...
method filter (line 2) | filter(s,o){return new x(this.content).filter(s,o)}
method reject (line 2) | reject(s,o){return this.filter(a(s),o)}
method forEach (line 2) | forEach(s,o){return this.content.forEach((i=>s.bind(o)(i.value,i.key,i)))}
function trimLeft (line 2) | function trimLeft(s){return(s||"").toString().replace(_,"")}
function lolcation (line 2) | function lolcation(s){var o,a=("undefined"!=typeof window?window:void 0!...
function isSpecial (line 2) | function isSpecial(s){return"file:"===s||"ftp:"===s||"http:"===s||"https...
function extractProtocol (line 2) | function extractProtocol(s,o){s=(s=trimLeft(s)).replace(w,""),o=o||{};va...
function Url (line 2) | function Url(s,o,i){if(s=(s=trimLeft(s)).replace(w,""),!(this instanceof...
function PassThrough (line 2) | function PassThrough(s){if(!(this instanceof PassThrough))return new Pas...
function Sha1 (line 2) | function Sha1(){this.init(),this._w=x,u.call(this,64,56)}
function rotl5 (line 2) | function rotl5(s){return s<<5|s>>>27}
function rotl30 (line 2) | function rotl30(s){return s<<30|s>>>2}
function ft (line 2) | function ft(s,o,i,a){return 0===s?o&i|~o&a:2===s?o&i|o&a|i&a:o^i^a}
function defaultSetTimout (line 2) | function defaultSetTimout(){throw new Error("setTimeout has not been def...
function defaultClearTimeout (line 2) | function defaultClearTimeout(){throw new Error("clearTimeout has not bee...
function runTimeout (line 2) | function runTimeout(s){if(o===setTimeout)return setTimeout(s,0);if((o===...
function cleanUpNextTick (line 2) | function cleanUpNextTick(){w&&u&&(w=!1,u.length?_=u.concat(_):x=-1,_.len...
function drainQueue (line 2) | function drainQueue(){if(!w){var s=runTimeout(cleanUpNextTick);w=!0;for(...
function Item (line 2) | function Item(s,o){this.fun=s,this.array=o}
function noop (line 2) | function noop(){}
function getLens (line 2) | function getLens(s){var o=s.length;if(o%4>0)throw new Error("Invalid str...
function encodeChunk (line 2) | function encodeChunk(s,o,a){for(var u,_,w=[],x=o;x<a;x+=3)u=(s[x]<<16&16...
method constructor (line 2) | constructor(s,o,i){super(s,o,i),this.element="string"}
method primitive (line 2) | primitive(){return"string"}
method length (line 2) | get length(){return this.content.length}
function concat (line 2) | function concat(...s){return s.map((s=>function source(s){return s?"stri...
function baseAry (line 2) | function baseAry(s,o){return 2==o?function(o,i){return s(o,i)}:function(...
function cloneArray (line 2) | function cloneArray(s){for(var o=s?s.length:0,i=Array(o);o--;)i[o]=s[o];...
function wrapImmutable (line 2) | function wrapImmutable(s,o){return function(){var i=arguments.length;if(...
function castCap (line 2) | function castCap(s,o){if(j){var i=a.iterateeRearg[s];if(i)return functio...
function castFixed (line 2) | function castFixed(s,o,i){if(B&&(Y||!a.skipFixed[s])){var u=a.methodSpre...
function castRearg (line 2) | function castRearg(s,o,i){return V&&i>1&&(Z||!a.skipRearg[s])?we(o,a.met...
function cloneByPath (line 2) | function cloneByPath(s,o){for(var i=-1,a=(o=Pe(o)).length,u=a-1,_=le(Obj...
function createConverter (line 2) | function createConverter(s,o){var i=a.aliasToReal[s]||s,u=a.remap[i]||i,...
function overArg (line 2) | function overArg(s,o){return function(){var i=arguments.length;if(!i)ret...
function wrap (line 2) | function wrap(s,o,i){var u,_=a.aliasToReal[s]||s,w=o,x=Re[_];return x?w=...
function decode (line 2) | function decode(s){try{return decodeURIComponent(s.replace(/\+/g," "))}c...
function encode (line 2) | function encode(s){try{return encodeURIComponent(s)}catch(s){return null}}
function afterTransform (line 2) | function afterTransform(s,o){var i=this._transformState;i.transforming=!...
function Transform (line 2) | function Transform(s){if(!(this instanceof Transform))return new Transfo...
function prefinish (line 2) | function prefinish(){var s=this;"function"!=typeof this._flush||this._re...
function done (line 2) | function done(s,o,i){if(o)return s.emit("error",o);if(null!=i&&s.push(i)...
method serialise (line 2) | serialise(s){if(!(s instanceof this.namespace.elements.Element))throw ne...
method shouldSerialiseContent (line 2) | shouldSerialiseContent(s,o){return"parseResult"===s.element||"httpReques...
method refSerialiseContent (line 2) | refSerialiseContent(s,o){return delete o.attributes,{href:s.toValue(),pa...
method sourceMapSerialiseContent (line 2) | sourceMapSerialiseContent(s){return s.toValue()}
method dataStructureSerialiseContent (line 2) | dataStructureSerialiseContent(s){return[this.serialiseContent(s.content)]}
method enumSerialiseAttributes (line 2) | enumSerialiseAttributes(s){const o=s.attributes.clone(),i=o.remove("enum...
method enumSerialiseContent (line 2) | enumSerialiseContent(s){if(s._attributes){const o=s.attributes.get("enum...
method deserialise (line 2) | deserialise(s){if("string"==typeof s)return new this.namespace.elements....
method serialiseContent (line 2) | serialiseContent(s){if(s instanceof this.namespace.elements.Element)retu...
method deserialiseContent (line 2) | deserialiseContent(s){if(s){if(s.element)return this.deserialise(s);if(s...
method shouldRefract (line 2) | shouldRefract(s){return!!(s._attributes&&s.attributes.keys().length||s._...
method convertKeyToRefract (line 2) | convertKeyToRefract(s,o){return this.shouldRefract(o)?this.serialise(o):...
method serialiseEnum (line 2) | serialiseEnum(s){return s.children.map((s=>this.serialise(s)))}
method serialiseObject (line 2) | serialiseObject(s){const o={};return s.forEach(((s,i)=>{if(s){const a=i....
method deserialiseObject (line 2) | deserialiseObject(s,o){Object.keys(s).forEach((i=>{o.set(i,this.deserial...
function emitErrorAndCloseNT (line 2) | function emitErrorAndCloseNT(s,o){emitErrorNT(s,o),emitCloseNT(s)}
function emitCloseNT (line 2) | function emitCloseNT(s){s._writableState&&!s._writableState.emitClose||s...
function emitErrorNT (line 2) | function emitErrorNT(s,o){s.emit("error",o)}
class SubRange (line 2) | class SubRange{constructor(s,o){this.low=s,this.high=o,this.length=1+o-s...
method constructor (line 2) | constructor(s,o){this.low=s,this.high=o,this.length=1+o-s}
method overlaps (line 2) | overlaps(s){return!(this.high<s.low||this.low>s.high)}
method touches (line 2) | touches(s){return!(this.high+1<s.low||this.low-1>s.high)}
method add (line 2) | add(s){return new SubRange(Math.min(this.low,s.low),Math.max(this.high...
method subtract (line 2) | subtract(s){return s.low<=this.low&&s.high>=this.high?[]:s.low>this.lo...
method toString (line 2) | toString(){return this.low==this.high?this.low.toString():this.low+"-"...
class DRange (line 2) | class DRange{constructor(s,o){this.ranges=[],this.length=0,null!=s&&this...
method constructor (line 2) | constructor(s,o){this.ranges=[],this.length=0,null!=s&&this.add(s,o)}
method _update_length (line 2) | _update_length(){this.length=this.ranges.reduce(((s,o)=>s+o.length),0)}
method add (line 2) | add(s,o){var _add=s=>{for(var o=0;o<this.ranges.length&&!s.touches(thi...
method subtract (line 2) | subtract(s,o){var _subtract=s=>{for(var o=0;o<this.ranges.length&&!s.o...
method intersect (line 2) | intersect(s,o){var i=[],_intersect=s=>{for(var o=0;o<this.ranges.lengt...
method index (line 2) | index(s){for(var o=0;o<this.ranges.length&&this.ranges[o].length<=s;)s...
method toString (line 2) | toString(){return"[ "+this.ranges.join(", ")+" ]"}
method clone (line 2) | clone(){return new DRange(this)}
method numbers (line 2) | numbers(){return this.ranges.reduce(((s,o)=>{for(var i=o.low;i<=o.high...
method subranges (line 2) | subranges(){return this.ranges.map((s=>({low:s.low,high:s.high,length:...
function ListCache (line 2) | function ListCache(s){var o=-1,i=null==s?0:s.length;for(this.clear();++o...
function ownKeys (line 2) | function ownKeys(s,o){var i=Object.keys(s);if(Object.getOwnPropertySymbo...
function _objectSpread (line 2) | function _objectSpread(s){for(var o=1;o<arguments.length;o++){var i=null...
function _defineProperty (line 2) | function _defineProperty(s,o,i){return(o=_toPropertyKey(o))in s?Object.d...
function _defineProperties (line 2) | function _defineProperties(s,o){for(var i=0;i<o.length;i++){var a=o[i];a...
function _toPropertyKey (line 2) | function _toPropertyKey(s){var o=function _toPrimitive(s,o){if("object"!...
function BufferList (line 2) | function BufferList(){!function _classCallCheck(s,o){if(!(s instanceof o...
function _typeof (line 2) | function _typeof(s){return _typeof="function"==typeof Symbol&&"symbol"==...
function _interopRequireDefault (line 2) | function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}
function _objectWithoutProperties (line 2) | function _objectWithoutProperties(s,o){if(null==s)return{};var i,a,u=fun...
function ownKeys (line 2) | function ownKeys(s,o){var i=Object.keys(s);if(Object.getOwnPropertySymbo...
function _objectSpread (line 2) | function _objectSpread(s){for(var o=1;o<arguments.length;o++){var i=null...
function _defineProperties (line 2) | function _defineProperties(s,o){for(var i=0;i<o.length;i++){var a=o[i];a...
function _setPrototypeOf (line 2) | function _setPrototypeOf(s,o){return _setPrototypeOf=Object.setPrototype...
function _createSuper (line 2) | function _createSuper(s){var o=function _isNativeReflectConstruct(){if("...
function _assertThisInitialized (line 2) | function _assertThisInitialized(s){if(void 0===s)throw new ReferenceErro...
function _getPrototypeOf (line 2) | function _getPrototypeOf(s){return _getPrototypeOf=Object.setPrototypeOf...
function _defineProperty (line 2) | function _defineProperty(s,o,i){return o in s?Object.defineProperty(s,o,...
function DebounceInput (line 2) | function DebounceInput(s){var i;!function _classCallCheck(s,o){if(!(s in...
function isSpecificValue (line 2) | function isSpecificValue(s){return s instanceof a||s instanceof Date||s ...
function cloneSpecificValue (line 2) | function cloneSpecificValue(s){if(s instanceof a){var o=a.alloc?a.alloc(...
function deepCloneArray (line 2) | function deepCloneArray(s){var o=[];return s.forEach((function(s,i){"obj...
function safeGetProperty (line 2) | function safeGetProperty(s,o){return"__proto__"===o?void 0:s[o]}
function _interopRequireDefault (line 2) | function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}
function Sha512 (line 2) | function Sha512(){this.init(),this._w=x,u.call(this,128,112)}
function Ch (line 2) | function Ch(s,o,i){return i^s&(o^i)}
function maj (line 2) | function maj(s,o,i){return s&o|i&(s|o)}
function sigma0 (line 2) | function sigma0(s,o){return(s>>>28|o<<4)^(o>>>2|s<<30)^(o>>>7|s<<25)}
function sigma1 (line 2) | function sigma1(s,o){return(s>>>14|o<<18)^(s>>>18|o<<14)^(o>>>9|s<<23)}
function Gamma0 (line 2) | function Gamma0(s,o){return(s>>>1|o<<31)^(s>>>8|o<<24)^s>>>7}
function Gamma0l (line 2) | function Gamma0l(s,o){return(s>>>1|o<<31)^(s>>>8|o<<24)^(s>>>7|o<<25)}
function Gamma1 (line 2) | function Gamma1(s,o){return(s>>>19|o<<13)^(o>>>29|s<<3)^s>>>6}
function Gamma1l (line 2) | function Gamma1l(s,o){return(s>>>19|o<<13)^(o>>>29|s<<3)^(s>>>6|o<<26)}
function getCarry (line 2) | function getCarry(s,o){return s>>>0<o>>>0?1:0}
function writeInt64BE (line 2) | function writeInt64BE(o,i,a){s.writeInt32BE(o,a),s.writeInt32BE(i,a+4)}
function StringDecoder (line 2) | function StringDecoder(s){var o;switch(this.encoding=function normalizeE...
function utf8CheckByte (line 2) | function utf8CheckByte(s){return s<=127?0:s>>5==6?2:s>>4==14?3:s>>3==30?...
function utf8FillLast (line 2) | function utf8FillLast(s){var o=this.lastTotal-this.lastNeed,i=function u...
function utf16Text (line 2) | function utf16Text(s,o){if((s.length-o)%2==0){var i=s.toString("utf16le"...
function utf16End (line 2) | function utf16End(s){var o=s&&s.length?this.write(s):"";if(this.lastNeed...
function base64Text (line 2) | function base64Text(s,o){var i=(s.length-o)%3;return 0===i?s.toString("b...
function base64End (line 2) | function base64End(s){var o=s&&s.length?this.write(s):"";return this.las...
function simpleWrite (line 2) | function simpleWrite(s){return s.toString(this.encoding)}
function simpleEnd (line 2) | function simpleEnd(s){return s&&s.length?this.write(s):""}
method constructor (line 2) | constructor(s){this.namespace=s||new this.Namespace}
method serialise (line 2) | serialise(s){if(!(s instanceof this.namespace.elements.Element))throw ne...
method deserialise (line 2) | deserialise(s){if(!s.element)throw new Error("Given value is not an obje...
method serialiseContent (line 2) | serialiseContent(s){if(s instanceof this.namespace.elements.Element)retu...
method deserialiseContent (line 2) | deserialiseContent(s){if(s){if(s.element)return this.deserialise(s);if(s...
method serialiseObject (line 2) | serialiseObject(s){const o={};if(s.forEach(((s,i)=>{s&&(o[i.toValue()]=t...
method deserialiseObject (line 2) | deserialiseObject(s,o){Object.keys(s).forEach((i=>{o.set(i,this.deserial...
function create (line 2) | function create(s){return FormattedError.displayName=s.displayName||s.na...
function createErrorType (line 2) | function createErrorType(s,i,a){a||(a=Error);var u=function(s){function ...
function oneOf (line 2) | function oneOf(s,o){if(Array.isArray(s)){var i=s.length;return s=s.map((...
function noop (line 2) | function noop(){}
method constructor (line 2) | constructor(s,o,i){super(s||[],o,i),this.element="link"}
method relation (line 2) | get relation(){return this.attributes.get("relation")}
method relation (line 2) | set relation(s){this.attributes.set("relation",s)}
method href (line 2) | get href(){return this.attributes.get("href")}
method href (line 2) | set href(s){this.attributes.set("href",s)}
function refract (line 2) | function refract(s){if(s instanceof a)return s;if("string"==typeof s)ret...
method constructor (line 2) | constructor(s,o,i,u){super(new a,i,u),this.element="member",this.key=s,t...
method key (line 2) | get key(){return this.content.key}
method key (line 2) | set key(s){this.content.key=this.refract(s)}
method value (line 2) | get value(){return this.content.value}
method value (line 2) | set value(s){this.content.value=this.refract(s)}
function Stream (line 2) | function Stream(){a.call(this)}
function ondata (line 2) | function ondata(o){s.writable&&!1===s.write(o)&&i.pause&&i.pause()}
function ondrain (line 2) | function ondrain(){i.readable&&i.resume&&i.resume()}
function onend (line 2) | function onend(){u||(u=!0,s.end())}
function onclose (line 2) | function onclose(){u||(u=!0,"function"==typeof s.destroy&&s.destroy())}
function onerror (line 2) | function onerror(s){if(cleanup(),0===a.listenerCount(this,"error"))throw s}
function cleanup (line 2) | function cleanup(){i.removeListener("data",ondata),s.removeListener("dra...
function Hash (line 2) | function Hash(s,o){this._block=a.alloc(s),this._finalSize=o,this._blockS...
function coerceElementMatchingCallback (line 2) | function coerceElementMatchingCallback(s){return"string"==typeof s?o=>o....
class ArraySlice (line 2) | class ArraySlice{constructor(s){this.elements=s||[]}toValue(){return thi...
method constructor (line 2) | constructor(s){this.elements=s||[]}
method toValue (line 2) | toValue(){return this.elements.map((s=>s.toValue()))}
method map (line 2) | map(s,o){return this.elements.map(s,o)}
method flatMap (line 2) | flatMap(s,o){return this.map(s,o).reduce(((s,o)=>s.concat(o)),[])}
method compactMap (line 2) | compactMap(s,o){const i=[];return this.forEach((a=>{const u=s.bind(o)(...
method filter (line 2) | filter(s,o){return s=coerceElementMatchingCallback(s),new ArraySlice(t...
method reject (line 2) | reject(s,o){return s=coerceElementMatchingCallback(s),new ArraySlice(t...
method find (line 2) | find(s,o){return s=coerceElementMatchingCallback(s),this.elements.find...
method forEach (line 2) | forEach(s,o){this.elements.forEach(s,o)}
method reduce (line 2) | reduce(s,o){return this.elements.reduce(s,o)}
method includes (line 2) | includes(s){return this.elements.some((o=>o.equals(s)))}
method shift (line 2) | shift(){return this.elements.shift()}
method unshift (line 2) | unshift(s){this.elements.unshift(this.refract(s))}
method push (line 2) | push(s){return this.elements.push(this.refract(s)),this}
method add (line 2) | add(s){this.push(s)}
method get (line 2) | get(s){return this.elements[s]}
method getValue (line 2) | getValue(s){const o=this.elements[s];if(o)return o.toValue()}
method length (line 2) | get length(){return this.elements.length}
method isEmpty (line 2) | get isEmpty(){return 0===this.elements.length}
method first (line 2) | get first(){return this.elements[0]}
function copyProps (line 2) | function copyProps(s,o){for(var i in s)o[i]=s[i]}
function SafeBuffer (line 2) | function SafeBuffer(s,o,i){return u(s,o,i)}
function config (line 2) | function config(s){try{if(!i.g.localStorage)return!1}catch(s){return!1}v...
function lookahead (line 2) | function lookahead(s){return concat("(?=",s,")")}
function concat (line 2) | function concat(...s){return s.map((s=>function source(s){return s?"stri...
function __webpack_require__ (line 2) | function __webpack_require__(i){var a=o[i];if(void 0!==a)return a.export...
function formatProdErrorMessage (line 2) | function formatProdErrorMessage(s){return`Minified Redux error #${s}; vi...
function isPlainObject (line 2) | function isPlainObject(s){if("object"!=typeof s||null===s)return!1;let o...
function createStore (line 2) | function createStore(s,o,i){if("function"!=typeof s)throw new Error(form...
function bindActionCreator (line 2) | function bindActionCreator(s,o){return function(...i){return o(s.apply(t...
function compose (line 2) | function compose(...s){return 0===s.length?s=>s:1===s.length?s[0]:s.redu...
function newThrownErr (line 2) | function newThrownErr(s){return{type:rt,payload:(0,Qe.serializeError)(s)}}
function newThrownErrBatch (line 2) | function newThrownErrBatch(s){return{type:nt,payload:s}}
function newSpecErr (line 2) | function newSpecErr(s){return{type:st,payload:s}}
function newSpecErrBatch (line 2) | function newSpecErrBatch(s){return{type:ot,payload:s}}
function newAuthErr (line 2) | function newAuthErr(s){return{type:it,payload:s}}
function clear (line 2) | function clear(s={}){return{type:at,payload:s}}
function clearBy (line 2) | function clearBy(s=()=>!0){return{type:ct,payload:s}}
function getParameterSchema (line 2) | function getParameterSchema(s,{isOAS3:o}={}){if(!We().Map.isMap(s))retur...
function objectify (line 2) | function objectify(s){return isObject(s)?immutableToJS(s):{}}
function fromJSOrdered (line 2) | function fromJSOrdered(s){if(isImmutable(s))return s;if(s instanceof lt....
function normalizeArray (line 2) | function normalizeArray(s){return Array.isArray(s)?s:[s]}
function isFn (line 2) | function isFn(s){return"function"==typeof s}
function isObject (line 2) | function isObject(s){return!!s&&"object"==typeof s}
function isFunc (line 2) | function isFunc(s){return"function"==typeof s}
function isArray (line 2) | function isArray(s){return Array.isArray(s)}
function objMap (line 2) | function objMap(s,o){return Object.keys(s).reduce(((i,a)=>(i[a]=o(s[a],a...
function objReduce (line 2) | function objReduce(s,o){return Object.keys(s).reduce(((i,a)=>{let u=o(s[...
function systemThunkMiddleware (line 2) | function systemThunkMiddleware(s){return({dispatch:o,getState:i})=>o=>i=...
function validateValueBySchema (line 2) | function validateValueBySchema(s,o,i,a,u){if(!o)return[];let _=[],w=o.ge...
function requiresValidationURL (line 2) | function requiresValidationURL(s){return!(!s||s.indexOf("localhost")>=0|...
function deeplyStripKey (line 2) | function deeplyStripKey(s,o,i=()=>!0){if("object"!=typeof s||Array.isArr...
function stringify (line 2) | function stringify(s){if("string"==typeof s)return s;if(s&&s.toJS&&(s=s....
function paramToIdentifier (line 2) | function paramToIdentifier(s,{returnAll:o=!1,allowHashes:i=!0}={}){if(!W...
function paramToValue (line 2) | function paramToValue(s,o){return paramToIdentifier(s,{returnAll:!0}).ma...
function b64toB64UrlEncoded (line 2) | function b64toB64UrlEncoded(s){return s.replace(/\+/g,"-").replace(/\//g...
function createStoreWithMiddleware (line 2) | function createStoreWithMiddleware(s,o,i){let a=[systemThunkMiddleware(i...
class Store (line 2) | class Store{constructor(s={}){Ye()(this,{state:{},plugins:[],system:{con...
method constructor (line 2) | constructor(s={}){Ye()(this,{state:{},plugins:[],system:{configs:{},fn...
method getStore (line 2) | getStore(){return this.store}
method register (line 2) | register(s,o=!0){var i=combinePlugins(s,this.getSystem());systemExtend...
method buildSystem (line 2) | buildSystem(s=!0){let o=this.getStore().dispatch,i=this.getStore().get...
method _getSystem (line 2) | _getSystem(){return this.boundSystem}
method getRootInjects (line 2) | getRootInjects(){return Object.assign({getSystem:this.getSystem,getSto...
method _getConfigs (line 2) | _getConfigs(){return this.system.configs}
method getConfigs (line 2) | getConfigs(){return{configs:this.system.configs}}
method setConfigs (line 2) | setConfigs(s){this.system.configs=s}
method rebuildReducer (line 2) | rebuildReducer(){this.store.replaceReducer(function buildReducer(s,o){...
method getType (line 2) | getType(s){let o=s[0].toUpperCase()+s.slice(1);return objReduce(this.s...
method getSelectors (line 2) | getSelectors(){return this.getType("selectors")}
method getActions (line 2) | getActions(){return objMap(this.getType("actions"),(s=>objReduce(s,((s...
method getWrappedAndBoundActions (line 2) | getWrappedAndBoundActions(s){return objMap(this.getBoundActions(s),((s...
method getWrappedAndBoundSelectors (line 2) | getWrappedAndBoundSelectors(s,o){return objMap(this.getBoundSelectors(...
method getStates (line 2) | getStates(s){return Object.keys(this.system.statePlugins).reduce(((o,i...
method getStateThunks (line 2) | getStateThunks(s){return Object.keys(this.system.statePlugins).reduce(...
method getFn (line 2) | getFn(){return{fn:this.system.fn}}
method getComponents (line 2) | getComponents(s){const o=this.system.components[s];return Array.isArra...
method getBoundSelectors (line 2) | getBoundSelectors(s,o){return objMap(this.getSelectors(),((i,a)=>{let ...
method getBoundActions (line 2) | getBoundActions(s){s=s||this.getStore().dispatch;const o=this.getActio...
method getMapStateToProps (line 2) | getMapStateToProps(){return()=>Object.assign({},this.getSystem())}
method getMapDispatchToProps (line 2) | getMapDispatchToProps(s){return o=>Ye()({},this.getWrappedAndBoundActi...
function combinePlugins (line 2) | function combinePlugins(s,o){return isObject(s)&&!isArray(s)?tt()({},s):...
function callAfterLoad (line 2) | function callAfterLoad(s,o,{hasLoaded:i}={}){let a=i;return isObject(s)&...
function systemExtend (line 2) | function systemExtend(s={},o={}){if(!isObject(s))return{};if(!isObject(o...
function wrapWithTryCatch (line 2) | function wrapWithTryCatch(s,o,{logErrors:i=!0}={}){return"function"!=typ...
function showDefinitions (line 2) | function showDefinitions(s){return{type:Mt,payload:s}}
function authorize (line 2) | function authorize(s){return{type:Rt,payload:s}}
function logout (line 2) | function logout(s){return{type:Dt,payload:s}}
function authorizeOauth2 (line 2) | function authorizeOauth2(s){return{type:Lt,payload:s}}
function configureAuth (line 2) | function configureAuth(s){return{type:Ft,payload:s}}
function restoreAuthorization (line 2) | function restoreAuthorization(s){return{type:Bt,payload:s}}
function assertIsFunction (line 2) | function assertIsFunction(s,o="expected a function, instead received "+t...
function getDependencies (line 2) | function getDependencies(s){const o=Array.isArray(s[0])?s[0]:s;return fu...
method constructor (line 2) | constructor(s){this.value=s}
method deref (line 2) | deref(){return this.value}
function weakMapMemoize (line 2) | function weakMapMemoize(s,o={}){let i={s:0,v:void 0,o:null,p:null};const...
function createSelectorCreator (line 2) | function createSelectorCreator(s,...o){const i="function"==typeof s?{mem...
class LockAuthIcon (line 2) | class LockAuthIcon extends Re.Component{mapStateToProps(s,o){return{stat...
method mapStateToProps (line 2) | mapStateToProps(s,o){return{state:s,ownProps:Gt()(o,Object.keys(o.getS...
method render (line 2) | render(){const{getComponent:s,ownProps:o}=this.props,i=s("LockIcon");r...
class UnlockAuthIcon (line 2) | class UnlockAuthIcon extends Re.Component{mapStateToProps(s,o){return{st...
method mapStateToProps (line 2) | mapStateToProps(s,o){return{state:s,ownProps:Gt()(o,Object.keys(o.getS...
method render (line 2) | render(){const{getComponent:s,ownProps:o}=this.props,i=s("UnlockIcon")...
function auth (line 2) | function auth(){return{afterLoad(s){this.rootInjects=this.rootInjects||{...
function preauthorizeBasic (line 2) | function preauthorizeBasic(s,o,i,a){const{authActions:{authorize:u},spec...
function preauthorizeApiKey (line 2) | function preauthorizeApiKey(s,o,i){const{authActions:{authorize:a},specS...
function isNothing (line 2) | function isNothing(s){return null==s}
function formatError (line 2) | function formatError(s,o){var i="",a=s.reason||"(unknown reason)";return...
function YAMLException$1 (line 2) | function YAMLException$1(s,o){Error.call(this),this.name="YAMLException"...
function getLine (line 2) | function getLine(s,o,i,a,u){var _="",w="",x=Math.floor(u/2)-1;return a-o...
function padStart (line 2) | function padStart(s,o){return er.repeat(" ",o-s.length)+s}
function compileList (line 2) | function compileList(s,o){var i=[];return s[o].forEach((function(s){var ...
function Schema$1 (line 2) | function Schema$1(s){return this.extend(s)}
function collectType (line 2) | function collectType(s){s.multi?(i.multi[s.kind].push(s),i.multi.fallbac...
function isOctCode (line 2) | function isOctCode(s){return 48<=s&&s<=55}
function isDecCode (line 2) | function isDecCode(s){return 48<=s&&s<=57}
function _class (line 2) | function _class(s){return Object.prototype.toString.call(s)}
function is_EOL (line 2) | function is_EOL(s){return 10===s||13===s}
function is_WHITE_SPACE (line 2) | function is_WHITE_SPACE(s){return 9===s||32===s}
function is_WS_OR_EOL (line 2) | function is_WS_OR_EOL(s){return 9===s||32===s||10===s||13===s}
function is_FLOW_INDICATOR (line 2) | function is_FLOW_INDICATOR(s){return 44===s||91===s||93===s||123===s||12...
function fromHexCode (line 2) | function fromHexCode(s){var o;return 48<=s&&s<=57?s-48:97<=(o=32|s)&&o<=...
function simpleEscapeSequence (line 2) | function simpleEscapeSequence(s){return 48===s?"\0":97===s?"":98===s?"\...
function charFromCodepoint (line 2) | function charFromCodepoint(s){return s<=65535?String.fromCharCode(s):Str...
function State$1 (line 2) | function State$1(s,o){this.input=s,this.filename=o.filename||null,this.s...
function generateError (line 2) | function generateError(s,o){var i={name:s.filename,buffer:s.input.slice(...
function throwError (line 2) | function throwError(s,o){throw generateError(s,o)}
function throwWarning (line 2) | function throwWarning(s,o){s.onWarning&&s.onWarning.call(null,generateEr...
function captureSegment (line 2) | function captureSegment(s,o,i,a){var u,_,w,x;if(o<i){if(x=s.input.slice(...
function mergeMappings (line 2) | function mergeMappings(s,o,i,a){var u,_,w,x;for(er.isObject(i)||throwErr...
function storeMappingPair (line 2) | function storeMappingPair(s,o,i,a,u,_,w,x,C){var j,L;if(Array.isArray(u)...
function readLineBreak (line 2) | function readLineBreak(s){var o;10===(o=s.input.charCodeAt(s.position))?...
function skipSeparationSpace (line 2) | function skipSeparationSpace(s,o,i){for(var a=0,u=s.input.charCodeAt(s.p...
function testDocumentSeparator (line 2) | function testDocumentSeparator(s){var o,i=s.position;return!(45!==(o=s.i...
function writeFoldedLines (line 2) | function writeFoldedLines(s,o){1===o?s.result+=" ":o>1&&(s.result+=er.re...
function readBlockSequence (line 2) | function readBlockSequence(s,o){var i,a,u=s.tag,_=s.anchor,w=[],x=!1;if(...
function readTagProperty (line 2) | function readTagProperty(s){var o,i,a,u,_=!1,w=!1;if(33!==(u=s.input.cha...
function readAnchorProperty (line 2) | function readAnchorProperty(s){var o,i;if(38!==(i=s.input.charCodeAt(s.p...
function composeNode (line 2) | function composeNode(s,o,i,a,u){var _,w,x,C,j,L,B,$,V,U=1,z=!1,Y=!1;if(n...
function readDocument (line 2) | function readDocument(s){var o,i,a,u,_=s.position,w=!1;for(s.version=nul...
function loadDocuments (line 2) | function loadDocuments(s,o){o=o||{},0!==(s=String(s)).length&&(10!==s.ch...
function encodeHex (line 2) | function encodeHex(s){var o,i,a;if(o=s.toString(16).toUpperCase(),s<=255...
function State (line 2) | function State(s){this.schema=s.schema||Mr,this.indent=Math.max(1,s.inde...
function indentString (line 2) | function indentString(s,o){for(var i,a=er.repeat(" ",o),u=0,_=-1,w="",x=...
function generateNextLine (line 2) | function generateNextLine(s,o){return"\n"+er.repeat(" ",s.indent*o)}
function isWhitespace (line 2) | function isWhitespace(s){return 32===s||9===s}
function isPrintable (line 2) | function isPrintable(s){return 32<=s&&s<=126||161<=s&&s<=55295&&8232!==s...
function isNsCharOrWhitespace (line 2) | function isNsCharOrWhitespace(s){return isPrintable(s)&&s!==Kr&&13!==s&&...
function isPlainSafe (line 2) | function isPlainSafe(s,o,i){var a=isNsCharOrWhitespace(s),u=a&&!isWhites...
function codePointAt (line 2) | function codePointAt(s,o){var i,a=s.charCodeAt(o);return a>=55296&&a<=56...
function needIndentIndicator (line 2) | function needIndentIndicator(s){return/^\n* /.test(s)}
function chooseScalarStyle (line 2) | function chooseScalarStyle(s,o,i,a,u,_,w,x){var C,j=0,L=null,B=!1,$=!1,V...
function writeScalar (line 2) | function writeScalar(s,o,i,a,u){s.dump=function(){if(0===o.length)return...
function blockHeader (line 2) | function blockHeader(s,o){var i=needIndentIndicator(s)?String(o):"",a="\...
function dropEndingNewline (line 2) | function dropEndingNewline(s){return"\n"===s[s.length-1]?s.slice(0,-1):s}
function foldLine (line 2) | function foldLine(s,o){if(""===s||" "===s[0])return s;for(var i,a,u=/ [^...
function writeBlockSequence (line 2) | function writeBlockSequence(s,o,i,a){var u,_,w,x="",C=s.tag;for(u=0,_=i....
function detectType (line 2) | function detectType(s,o,i){var a,u,_,w,x,C;for(_=0,w=(u=i?s.explicitType...
function writeNode (line 2) | function writeNode(s,o,i,a,u,_,w){s.tag=null,s.dump=i,detectType(s,i,!1)...
function getDuplicateReferences (line 2) | function getDuplicateReferences(s,o){var i,a,u=[],_=[];for(inspectNode(s...
function inspectNode (line 2) | function inspectNode(s,o,i){var a,u,_;if(null!==s&&"object"==typeof s)if...
function renamed (line 2) | function renamed(s,o){return function(){throw new Error("Function yaml."...
function update (line 2) | function update(s,o){return{type:mn,payload:{[s]:o}}}
function toggle (line 2) | function toggle(s){return{type:gn,payload:s}}
function next (line 2) | function next(u){u instanceof Error||u.status>=400?(a.updateLoadingStatu...
function configsPlugin (line 2) | function configsPlugin(){return{statePlugins:{configs:{reducers:yn,actio...
method isShownKeyFromUrlHashArray (line 2) | isShownKeyFromUrlHashArray(s,o){const[i,a]=o;return a?["operations",i,a]...
method urlHashArrayFromIsShownKey (line 2) | urlHashArrayFromIsShownKey(s,o){let[i,a,u]=o;return"operations"==i?[a,u]...
method render (line 2) | render(){return Re.createElement("span",{ref:this.onLoad},Re.createEleme...
method render (line 2) | render(){return Re.createElement("span",{ref:this.onLoad},Re.createEleme...
function deep_linking (line 2) | function deep_linking(){return[En,{statePlugins:{configs:{wrapActions:{l...
function transform (line 2) | function transform(s){return s.map((s=>{let o="is not of a type(s)",i=s....
function parameter_oneof_transform (line 2) | function parameter_oneof_transform(s,{jsSpec:o}){return s}
function transformErrors (line 2) | function transformErrors(s){let o={jsSpec:{}},i=On()(jn,((s,i)=>{try{ret...
function err (line 2) | function err(o){return{statePlugins:{err:{reducers:{[rt]:(s,{payload:o})...
function opsFilter (line 2) | function opsFilter(s,o){return s.filter(((s,i)=>-1!==i.indexOf(o)))}
function filter (line 2) | function filter(){return{fn:{opsFilter}}}
function updateLayout (line 2) | function updateLayout(s){return{type:Rn,payload:s}}
function updateFilter (line 2) | function updateFilter(s){return{type:Dn,payload:s}}
function actions_show (line 2) | function actions_show(s,o=!0){return s=normalizeArray(s),{type:Fn,payloa...
function changeMode (line 2) | function changeMode(s,o=""){return s=normalizeArray(s),{type:Ln,payload:...
function plugins_layout (line 2) | function plugins_layout(){return{statePlugins:{layout:{reducers:Bn,actio...
function logs (line 2) | function logs({configs:s}){const o={debug:0,info:1,log:2,warn:3,error:4}...
function on_complete (line 2) | function on_complete(){return{statePlugins:{spec:{wrapActions:{updateSpe...
class ModelCollapse (line 2) | class ModelCollapse extends Re.Component{static defaultProps={collapsedC...
method constructor (line 2) | constructor(s,o){super(s,o);let{expanded:i,collapsedContent:a}=this.pr...
method componentDidMount (line 2) | componentDidMount(){const{hideSelfOnExpand:s,expanded:o,modelName:i}=t...
method UNSAFE_componentWillReceiveProps (line 2) | UNSAFE_componentWillReceiveProps(s){this.props.expanded!==s.expanded&&...
method render (line 2) | render(){const{title:s,classes:o}=this.props;return this.state.expande...
class ModelWrapper (line 2) | class ModelWrapper extends Re.Component{onToggle=(s,o)=>{this.props.layo...
method render (line 2) | render(){let{getComponent:s,getConfigs:o}=this.props;const i=s("Model"...
function _typeof (line 2) | function _typeof(s){return _typeof="function"==typeof Symbol&&"symbol"==...
function _defineProperties (line 2) | function _defineProperties(s,o){for(var i=0;i<o.length;i++){var a=o[i];a...
function _defineProperty (line 2) | function _defineProperty(s,o,i){return o in s?Object.defineProperty(s,o,...
function ownKeys (line 2) | function ownKeys(s,o){var i=Object.keys(s);if(Object.getOwnPropertySymbo...
function _getPrototypeOf (line 2) | function _getPrototypeOf(s){return _getPrototypeOf=Object.setPrototypeOf...
function _setPrototypeOf (line 2) | function _setPrototypeOf(s,o){return _setPrototypeOf=Object.setPrototype...
function _possibleConstructorReturn (line 2) | function _possibleConstructorReturn(s,o){return!o||"object"!=typeof o&&"...
function react_immutable_pure_component_es_get (line 2) | function react_immutable_pure_component_es_get(s,o,i){return function is...
function getIn (line 2) | function getIn(s,o,i){for(var a=0;a!==o.length;)if((s=react_immutable_pu...
function check (line 2) | function check(s){var o=arguments.length>1&&void 0!==arguments[1]?argume...
function ImmutablePureComponent (line 2) | function ImmutablePureComponent(){return function _classCallCheck(s,o){i...
function _extends (line 2) | function _extends(){return _extends=Object.assign?Object.assign.bind():f...
class Model (line 2) | class Model extends Xn{static propTypes={schema:xn().map.isRequired,getC...
method render (line 2) | render(){let{getComponent:s,getConfigs:o,specSelectors:i,schema:a,requ...
class Models (line 2) | class Models extends Re.Component{getSchemaBasePath=()=>this.props.specS...
method render (line 2) | render(){let{specSelectors:s,getComponent:o,layoutSelectors:i,layoutAc...
function isAbsoluteUrl (line 2) | function isAbsoluteUrl(s){return s.match(/^(?:[a-z]+:)?\/\//i)}
function buildBaseUrl (line 2) | function buildBaseUrl(s,o){return s?isAbsoluteUrl(s)?function addProtoco...
function safeBuildUrl (line 2) | function safeBuildUrl(s,o,{selectedServer:i=""}={}){try{return function ...
function sanitizeUrl (line 2) | function sanitizeUrl(s){if("string"!=typeof s||""===s.trim())return"";co...
class ObjectModel (line 2) | class ObjectModel extends Re.Component{render(){let{schema:s,name:o,disp...
method render (line 2) | render(){let{schema:s,name:o,displayName:i,isRef:a,getComponent:u,getC...
class ArrayModel (line 2) | class ArrayModel extends Re.Component{render(){let{getComponent:s,getCon...
method render (line 2) | render(){let{getComponent:s,getConfigs:o,schema:i,depth:a,expandDepth:...
class Primitive (line 2) | class Primitive extends Re.Component{render(){let{schema:s,getComponent:...
method render (line 2) | render(){let{schema:s,getComponent:o,getConfigs:i,name:a,displayName:u...
class Schemes (line 2) | class Schemes extends Re.Component{UNSAFE_componentWillMount(){let{schem...
method UNSAFE_componentWillMount (line 2) | UNSAFE_componentWillMount(){let{schemes:s}=this.props;this.setScheme(s...
method UNSAFE_componentWillReceiveProps (line 2) | UNSAFE_componentWillReceiveProps(s){this.props.currentScheme&&s.scheme...
method render (line 2) | render(){let{schemes:s,currentScheme:o}=this.props;return Re.createEle...
class SchemesContainer (line 2) | class SchemesContainer extends Re.Component{render(){const{specActions:s...
method render (line 2) | render(){const{specActions:s,specSelectors:o,getComponent:i}=this.prop...
class JsonSchemaForm (line 2) | class JsonSchemaForm extends Re.Component{static defaultProps=ss;compone...
method componentDidMount (line 2) | componentDidMount(){const{dispatchInitialValue:s,value:o,onChange:i}=t...
method render (line 2) | render(){let{schema:s,errors:o,value:i,onChange:a,getComponent:u,fn:_,...
class JsonSchema_string (line 2) | class JsonSchema_string extends Re.Component{static defaultProps=ss;onCh...
method render (line 2) | render(){let{getComponent:s,value:o,schema:i,errors:a,required:u,descr...
class JsonSchema_array (line 2) | class JsonSchema_array extends Re.PureComponent{static defaultProps=ss;c...
method constructor (line 2) | constructor(s,o){super(s,o),this.state={value:valueOrEmptyList(s.value...
method UNSAFE_componentWillReceiveProps (line 2) | UNSAFE_componentWillReceiveProps(s){const o=valueOrEmptyList(s.value);...
method render (line 2) | render(){let{getComponent:s,required:o,schema:i,errors:a,fn:u,disabled...
class JsonSchemaArrayItemText (line 2) | class JsonSchemaArrayItemText extends Re.Component{static defaultProps=s...
method render (line 2) | render(){let{value:s,errors:o,description:i,disabled:a}=this.props;ret...
class JsonSchemaArrayItemFile (line 2) | class JsonSchemaArrayItemFile extends Re.Component{static defaultProps=s...
method render (line 2) | render(){let{getComponent:s,errors:o,disabled:i}=this.props;const a=s(...
class JsonSchema_boolean (line 2) | class JsonSchema_boolean extends Re.Component{static defaultProps=ss;onE...
method render (line 2) | render(){let{getComponent:s,value:o,errors:i,schema:a,required:u,disab...
class JsonSchema_object (line 2) | class JsonSchema_object extends Re.PureComponent{constructor(){super()}s...
method constructor (line 2) | constructor(){super()}
method render (line 2) | render(){let{getComponent:s,value:o,errors:i,disabled:a}=this.props;co...
function valueOrEmptyList (line 2) | function valueOrEmptyList(s){return ze.List.isList(s)?s:Array.isArray(s)...
class Cache (line 2) | class Cache extends Map{delete(s){const o=Array.from(this.keys()).find(s...
method delete (line 2) | delete(s){const o=Array.from(this.keys()).find(shallowArrayEquals(s));...
method get (line 2) | get(s){const o=Array.from(this.keys()).find(shallowArrayEquals(s));ret...
method has (line 2) | has(s){return-1!==Array.from(this.keys()).findIndex(shallowArrayEquals...
function getParameter (line 2) | function getParameter(s,o,i,a){return o=o||[],s.getIn(["meta","paths",.....
function parameterValues (line 2) | function parameterValues(s,o,i){return o=o||[],operationWithMeta(s,...o)...
function parametersIncludeIn (line 2) | function parametersIncludeIn(s,o=""){if(ze.Li
Condensed preview — 489 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (6,341K chars).
[
{
"path": ".github/ISSUE_TEMPLATE/bug_report.yml",
"chars": 2932,
"preview": "name: \"Bug report\"\ndescription: \"Something isn't working right with NexaSDK\"\nlabels: [\"bug\"]\nbody:\n - type: markdown\n "
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.yml",
"chars": 1975,
"preview": "name: \"Feature request\"\ndescription: \"Request a new feature or improvement for NexaSDK\"\nlabels: [\"enhancement\"]\nbody:\n "
},
{
"path": ".github/ISSUE_TEMPLATE/model_request.yml",
"chars": 1849,
"preview": "name: \"Model request\"\ndescription: \"Request support for a new model or variant in NexaSDK\"\nlabels: [\"model-request\"]\nbod"
},
{
"path": ".github/workflows/build-linux.yml",
"chars": 4927,
"preview": "name: NexaCLI on Linux\n\non:\n push:\n tags:\n - \"v*\"\n\njobs:\n build-cli:\n name: Build ${{ matrix.runner }}\n "
},
{
"path": ".github/workflows/build-macos.yml",
"chars": 5588,
"preview": "name: NexaCLI on MacOS\n\non:\n push:\n tags:\n - \"v*\"\n\njobs:\n build-cli:\n name: macos_${{ matrix.arch }}\n ru"
},
{
"path": ".github/workflows/build-windows.yml",
"chars": 7683,
"preview": "name: NexaCLI on Windows\n\non:\n push:\n tags:\n - \"v*\"\n\njobs:\n build-cli:\n name: windows_${{ matrix.arch }}\n "
},
{
"path": ".github/workflows/lint.yml",
"chars": 691,
"preview": "name: Lint\n\non:\n pull_request:\n branches: [main]\n paths:\n - 'runner/**'\n - '.github/workflows/lint.yml'"
},
{
"path": ".github/workflows/test.yml",
"chars": 1878,
"preview": "name: Test\n\non:\n # pull_request:\n # branches: [main, main-test]\n workflow_dispatch:\n\njobs:\n test-llm:\n name: ${"
},
{
"path": ".gitignore",
"chars": 35,
"preview": ".DS_Store\n.vscode/\ntempnexaai-env/\n"
},
{
"path": "LICENSE",
"chars": 11348,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "NOTICE",
"chars": 9034,
"preview": "# Third-Party Licenses\n\nThis document provides information about third-party libraries used in the NexaSDK project and t"
},
{
"path": "README.md",
"chars": 14261,
"preview": "<div align=\"center\" style=\"text-decoration: none;\">\n <img width=\"100%\" src=\"assets/banner1.png\" alt=\"Nexa AI Banner\">\n "
},
{
"path": "README_zh.md",
"chars": 12090,
"preview": "<div align=\"center\" style=\"text-decoration: none;\">\n\t<img width=\"100%\" src=\"assets/banner1.png\" alt=\"Nexa AI Banner\">\n\t<"
},
{
"path": "bindings/android/.gitignore",
"chars": 532,
"preview": "# Gradle files\n.gradle/\nbuild/\narm64-v8a/\n.DS_Store\n# Local configuration file (sdk path, etc)\nlocal.properties\n\n# Log/O"
},
{
"path": "bindings/android/README.md",
"chars": 3941,
"preview": "# Nexa Android SDK Demo App\n\n[;\n// you may no"
},
{
"path": "bindings/android/app/proguard-rules.pro",
"chars": 1333,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "bindings/android/app/src/androidTest/java/com/nexa/demo/ExampleInstrumentedTest.kt",
"chars": 1249,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/AndroidManifest.xml",
"chars": 2812,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/assets/model_list.json",
"chars": 4940,
"preview": "[\n {\n \"id\": \"Llama3.2-3B-NPU-Turbo-NPU\",\n \"displayName\": \"Llama3.2-3B-NPU-Turbo-NPU\",\n \"modelName\": \"files-1-2"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/ChatAdapter.kt",
"chars": 5754,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/FileConfig.kt",
"chars": 870,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/GenerationConfigSample.kt",
"chars": 2089,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/MainActivity.kt",
"chars": 90980,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/MyApplication.kt",
"chars": 807,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/activity/FileContentActivity.kt",
"chars": 2279,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/bean/DownloadFileConfig.kt",
"chars": 915,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/bean/DownloadState.kt",
"chars": 674,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/bean/DownloadableFile.kt",
"chars": 716,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/bean/ModelData.kt",
"chars": 12568,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/bean/NexaManifestBean.kt",
"chars": 892,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/bean/S3FileBean.kt",
"chars": 1847,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/listeners/CustomDialogInterface.kt",
"chars": 3078,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/ui/theme/Color.kt",
"chars": 873,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/ui/theme/Theme.kt",
"chars": 2285,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/ui/theme/Type.kt",
"chars": 1578,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/utils/BugFixTest.kt",
"chars": 1995,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/utils/ExecShell.java",
"chars": 2261,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/utils/ImgUtil.kt",
"chars": 6720,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/utils/KeyboardUtil.kt",
"chars": 1046,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/utils/KotlinUtil.kt",
"chars": 3125,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/utils/MD5Utils.kt",
"chars": 8218,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/utils/ModelFileListingUtil.kt",
"chars": 11559,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/utils/PermissionUtil.kt",
"chars": 3202,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/utils/SharePreferenceKeys.kt",
"chars": 1198,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/java/com/nexa/demo/utils/WavRecorder.kt",
"chars": 8469,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/app/src/main/res/color/btn_enable_color.xml",
"chars": 841,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/drawable/bg_ai_message.xml",
"chars": 769,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/drawable/bg_audio_background.xml",
"chars": 1367,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/drawable/bg_input_box_background.xml",
"chars": 940,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/drawable/bg_user_message.xml",
"chars": 806,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/drawable/btn_rounded_black_bg_18.xml",
"chars": 808,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/drawable/btn_rounded_border.xml",
"chars": 1011,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/drawable/btn_rounded_border_18.xml",
"chars": 1011,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/drawable/btn_rounded_border_gray.xml",
"chars": 1009,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/drawable/ic_launcher_background.xml",
"chars": 6194,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/drawable/ic_launcher_foreground.xml",
"chars": 2290,
"preview": "<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may no"
},
{
"path": "bindings/android/app/src/main/res/drawable/icon_back.xml",
"chars": 1015,
"preview": "<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may no"
},
{
"path": "bindings/android/app/src/main/res/drawable/icon_close.xml",
"chars": 1011,
"preview": "<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may no"
},
{
"path": "bindings/android/app/src/main/res/drawable/icon_database.xml",
"chars": 1415,
"preview": "<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may no"
},
{
"path": "bindings/android/app/src/main/res/drawable/icon_file.xml",
"chars": 1775,
"preview": "<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may no"
},
{
"path": "bindings/android/app/src/main/res/layout/activity_file_content.xml",
"chars": 2554,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/layout/activity_main.xml",
"chars": 16079,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/layout/dialog_select_plugin_id.xml",
"chars": 2930,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/layout/item_ai_message.xml",
"chars": 1292,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/layout/item_assistant_image_message.xml",
"chars": 1378,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/layout/item_audio_scroll.xml",
"chars": 2388,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/layout/item_image_item_message.xml",
"chars": 996,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/layout/item_image_message.xml",
"chars": 1374,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/layout/item_image_scroll.xml",
"chars": 1371,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/layout/item_model.xml",
"chars": 1229,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/layout/item_profile_message.xml",
"chars": 1204,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/layout/item_user_message.xml",
"chars": 1208,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/layout/menu_layout.xml",
"chars": 1524,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
"chars": 931,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
"chars": 931,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/values/colors.xml",
"chars": 1055,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/values/strings.xml",
"chars": 821,
"preview": "<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may no"
},
{
"path": "bindings/android/app/src/main/res/values/themes.xml",
"chars": 925,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/main/res/xml/backup_rules.xml",
"chars": 1066,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?><!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ver"
},
{
"path": "bindings/android/app/src/main/res/xml/data_extraction_rules.xml",
"chars": 1139,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?><!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ver"
},
{
"path": "bindings/android/app/src/main/res/xml/file_paths.xml",
"chars": 846,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/app/src/test/java/com/nexa/demo/ExampleUnitTest.kt",
"chars": 933,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/build.gradle.kts",
"chars": 917,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/gradle/libs.versions.toml",
"chars": 5000,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "bindings/android/gradle/wrapper/gradle-wrapper.properties",
"chars": 231,
"preview": "#Fri Aug 22 13:22:30 CST 2025\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://"
},
{
"path": "bindings/android/gradle.properties",
"chars": 1961,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "bindings/android/gradlew",
"chars": 5766,
"preview": "#!/usr/bin/env sh\n\n#\n# Copyright 2015 the original author or authors.\n#\n# Licensed under the Apache License, Version 2.0"
},
{
"path": "bindings/android/gradlew.bat",
"chars": 2674,
"preview": "@rem\n@rem Copyright 2015 the original author or authors.\n@rem\n@rem Licensed under the Apache License, Version 2.0 (the \""
},
{
"path": "bindings/android/settings.gradle.kts",
"chars": 1543,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/transform/.gitignore",
"chars": 6,
"preview": "/build"
},
{
"path": "bindings/android/transform/build.gradle.kts",
"chars": 1676,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/transform/consumer-rules.pro",
"chars": 583,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "bindings/android/transform/proguard-rules.pro",
"chars": 1333,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "bindings/android/transform/src/androidTest/java/ai/nexa/transform/ExampleInstrumentedTest.kt",
"chars": 1262,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/transform/src/main/AndroidManifest.xml",
"chars": 771,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "bindings/android/transform/src/main/java/ai/nexa/transform/DownloadUtils.kt",
"chars": 2016,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/transform/src/main/java/ai/nexa/transform/ImageUtils.kt",
"chars": 1410,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/transform/src/main/java/ai/nexa/transform/VlmContentTransfer.kt",
"chars": 1586,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/android/transform/src/test/java/ai/nexa/transform/ExampleUnitTest.kt",
"chars": 937,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "bindings/ios/.gitignore",
"chars": 0,
"preview": ""
},
{
"path": "bindings/ios/README.md",
"chars": 4013,
"preview": "## Overview\n\nNexa SDK enables on-device AI inference on iPhone / iPad / macOS (on supported platforms). It covers a wide"
},
{
"path": "bindings/ios/README_zh.md",
"chars": 2865,
"preview": "\n## 概述\n\nNexa SDK 支持在 iPhone / iPad / macOS(在适配平台)上进行本地 AI 推理,覆盖大语言模型(LLM)、视觉-语言模型(VLM)、文本向量化(Embedder)、语音识别(ASR)、重排序(Rer"
},
{
"path": "bindings/python/.gitignore",
"chars": 13,
"preview": "__pycache__/\n"
},
{
"path": "bindings/python/README.md",
"chars": 3306,
"preview": "# NexaAI Python SDK\n\nThis directory contains the NexaAI Python SDK and comprehensive examples for various AI inference t"
},
{
"path": "bindings/python/README_env_setup.md",
"chars": 951,
"preview": "# ARM64 Python Environment Setup for Nexa SDK\n\n## Setup\n\nRun the PowerShell script from the project root to create a vir"
},
{
"path": "bindings/python/README_zh.md",
"chars": 2213,
"preview": "# NexaAI Python SDK\n\n本目录包含 NexaAI Python SDK 及多种 AI 推理任务的全面示例。\n\n## 快速开始\n\n最简单的方式是通过我们的交互式 Jupyter notebook。你可以在 [`noteboo"
},
{
"path": "bindings/python/asr.py",
"chars": 7836,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not"
},
{
"path": "bindings/python/cv_ocr.py",
"chars": 1813,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "bindings/python/diarize.py",
"chars": 2663,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "bindings/python/embedder.py",
"chars": 3673,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "bindings/python/env_setup.ps1",
"chars": 7493,
"preview": "# PowerShell script to setup ARM64 Python and install nexaai\n# This script will:\n# 1. Download and install ARM64 Python "
},
{
"path": "bindings/python/image_gen.py",
"chars": 4673,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "bindings/python/llm.py",
"chars": 3894,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not"
},
{
"path": "bindings/python/models.py",
"chars": 3497,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "bindings/python/notebook/macos.ipynb",
"chars": 26546,
"preview": "{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"# NexaAI macOS Infe"
},
{
"path": "bindings/python/notebook/windows(arm64).ipynb",
"chars": 34824,
"preview": "{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"# NexaAI NPU Infere"
},
{
"path": "bindings/python/notebook/windows(x64).ipynb",
"chars": 22241,
"preview": "{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"# NexaAI windows(x6"
},
{
"path": "bindings/python/rerank.py",
"chars": 2634,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "bindings/python/tts.py",
"chars": 2845,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "bindings/python/vlm.py",
"chars": 5199,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "cookbook/.gitignore",
"chars": 24,
"preview": "__pycache__/\nnexaai-env/"
},
{
"path": "cookbook/PC/Agent-Granite/Python-Binding-Example/README.md",
"chars": 1501,
"preview": "## About\n\nThis demo showcases a function tool implementation using NexaAI Python binding. \n\n## Setup\n\n### Prerequisites\n"
},
{
"path": "cookbook/PC/Agent-Granite/Python-Binding-Example/agent_nexa.py",
"chars": 16942,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "cookbook/PC/Agent-Granite/Python-Binding-Example/gradio_ui.py",
"chars": 7010,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "cookbook/PC/Agent-Granite/Python-Binding-Example/requirements.txt",
"chars": 61,
"preview": "requests>=2.32.4\npydantic>=2.4.0\npsutil\ngoogle-search-results"
},
{
"path": "cookbook/PC/Agent-Granite/README.md",
"chars": 389,
"preview": "# Agent with Granite-4-Micro model\n\n## Overview\n\nThis project showcases a lightweight on-device AI assistant powered by "
},
{
"path": "cookbook/PC/Agent-Granite/Serve-Example/README.md",
"chars": 1666,
"preview": "## About\n\nThis demo showcases a function tool implementation using Nexa Sdk. \n\n## Setup\n\n### Prerequisites\n\n- Nexa SDK I"
},
{
"path": "cookbook/PC/Agent-Granite/Serve-Example/agent_nexa.py",
"chars": 17185,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "cookbook/PC/Agent-Granite/Serve-Example/gradio_ui.py",
"chars": 7010,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "cookbook/PC/Agent-Granite/Serve-Example/requirements.txt",
"chars": 61,
"preview": "requests>=2.32.4\npydantic>=2.4.0\npsutil\ngoogle-search-results"
},
{
"path": "cookbook/PC/Multimodal-Qwen3VL/Python-Binding-Example/gradio_ui.py",
"chars": 6025,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "cookbook/PC/Multimodal-Qwen3VL/Python-Binding-Example/vlm_service.py",
"chars": 9052,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "cookbook/PC/Multimodal-Qwen3VL/Python-Binding-Example/vlm_viewmodel.py",
"chars": 3180,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "cookbook/PC/Multimodal-Qwen3VL/README.md",
"chars": 969,
"preview": "## About\n\nThis demo showcases how to use NexaAI Python Binding to build a Vision-Language Model (VLM) application that s"
},
{
"path": "cookbook/PC/RAG-LLM/Python-Binding-Example/README.md",
"chars": 1356,
"preview": "## About\n\nThis demo showcases a RAG implementation using NexaAI Python binding. \n\n## Setup\n\n### Prerequisites\n\n| Platfor"
},
{
"path": "cookbook/PC/RAG-LLM/Python-Binding-Example/gradio_ui.py",
"chars": 12001,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "cookbook/PC/RAG-LLM/Python-Binding-Example/rag_nexa.py",
"chars": 26370,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "cookbook/PC/RAG-LLM/README.md",
"chars": 896,
"preview": "# RAG Pipeline Demo\n\n## About\nThis project is a demo for building a Retrieval-Augmented Generation (RAG) pipeline using "
},
{
"path": "cookbook/PC/RAG-LLM/Serve-Example/README.md",
"chars": 1638,
"preview": "## About\n\nThis demo showcases a RAG implementation using Nexa Sdk.\n\n## Setup\n\n### Prerequisites\n\n- Nexa SDK Installed (["
},
{
"path": "cookbook/PC/RAG-LLM/Serve-Example/gradio_ui.py",
"chars": 12554,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "cookbook/PC/RAG-LLM/Serve-Example/rag_nexa.py",
"chars": 26817,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "cookbook/PC/RAG-VLM/.gitignore",
"chars": 29,
"preview": "docs/*\nvecdb.json\n__pycache__"
},
{
"path": "cookbook/PC/RAG-VLM/README.md",
"chars": 2520,
"preview": "# RAG with Qwen3VL and Nexa Serve\n\n## 1. About\nThis project is a lightweight **Retrieval-Augmented Generation (RAG)** sy"
},
{
"path": "cookbook/PC/RAG-VLM/gradio_ui.py",
"chars": 10346,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "cookbook/PC/RAG-VLM/rag_nexa.py",
"chars": 16504,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "cookbook/PC/RAG-VLM/requirements.txt",
"chars": 110,
"preview": "faiss-cpu>=1.8\nrequests>=2.32.4\npydantic>=2.4.0\npython-docx>=1.1\npsutil\nsentence_transformers\nlangchain>=0.3.1"
},
{
"path": "cookbook/PC/Web-Agent-Qwen3VL/README.md",
"chars": 6189,
"preview": "# Web Agent with Qwen3-VL\n\n## Overview\n\nThis demo integrates Nexa SDK with Web-UI to enable local multimodal LLM-driven "
},
{
"path": "cookbook/PC/function-calling/.gitignore",
"chars": 32,
"preview": "__pycache__/\n*.json\napp/uploads/"
},
{
"path": "cookbook/PC/function-calling/README.md",
"chars": 2536,
"preview": "# NexaAI VLM Function Call Demo with Google Calendar MCP\n\nDemonstrates function calling capabilities of NexaAI/OmniNeura"
},
{
"path": "cookbook/PC/function-calling/app/flask_ui.py",
"chars": 12151,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "cookbook/PC/function-calling/app/image_utils.py",
"chars": 1406,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "cookbook/PC/function-calling/app/templates/chat.html",
"chars": 30056,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width"
},
{
"path": "cookbook/PC/function-calling/main.py",
"chars": 19822,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "cookbook/PC/function-calling/requirements.txt",
"chars": 16,
"preview": "mcp\nFlask[async]"
},
{
"path": "cookbook/PC/live-translate/README.md",
"chars": 1631,
"preview": "# NexaAI Live Translator\n\nReal-time speech recognition and language translation demo using NexaAI's ASR and LLM models. "
},
{
"path": "cookbook/PC/live-translate/app.py",
"chars": 15694,
"preview": "import logging\nimport atexit\nimport threading\nimport numpy as np\nfrom queue import Queue, Empty\nfrom typing import Optio"
},
{
"path": "cookbook/PC/live-translate/index.html",
"chars": 24998,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-widt"
},
{
"path": "cookbook/PC/live-translate/requirements.txt",
"chars": 123,
"preview": "nexaai>=v1.0.44-rc1\nFlask>=2.3.0\nflask-cors>=4.0.0\nflask-socketio>=5.3.0\npython-socketio>=5.9.0\nnumpy>=1.24.0\njsonify>=0"
},
{
"path": "cookbook/README.md",
"chars": 1963,
"preview": "# Nexa SDK Cookbook\n\nThis repository contains comprehensive demos and examples for Nexa SDK across different platforms: "
},
{
"path": "cookbook/README_zh.md",
"chars": 1447,
"preview": "# Nexa SDK 使用指南\n\n本仓库包含 Nexa SDK 在不同平台的完整演示和示例:**PC (Python)**、**Android** 和 **Linux**。\n\n---\n\n## 📁 目录结构\n\n- **`PC/`** - 适用"
},
{
"path": "cookbook/ag2/README.md",
"chars": 512,
"preview": "# AG2 + Nexa SDK Examples\r\n\r\nPractical examples of integrating Nexa SDK with AG2 (formerly AutoGen).\r\n\r\n\r\n## Prerequisit"
},
{
"path": "cookbook/ag2/example.py",
"chars": 2755,
"preview": "#!/usr/bin/env python3\r\n\"\"\"\r\nBasic agent example with Nexa SDK and AG2.\r\n\r\nDemonstrates:\r\n- Configuring AG2 with Nexa SD"
},
{
"path": "cookbook/ag2/requirements.txt",
"chars": 20,
"preview": "ag2[openai]>=0.8.0\r\n"
},
{
"path": "cookbook/android/RAG-LLM/.gitignore",
"chars": 532,
"preview": "# Gradle files\n.gradle/\nbuild/\narm64-v8a/\n.DS_Store\n# Local configuration file (sdk path, etc)\nlocal.properties\n\n# Log/O"
},
{
"path": "cookbook/android/RAG-LLM/README.md",
"chars": 1343,
"preview": "# Nexa Android SDK Demo App \n\n## Overview\n\nThe Nexa AI Android SDK enables on-device AI inference for Android applicatio"
},
{
"path": "cookbook/android/RAG-LLM/app/.gitignore",
"chars": 85,
"preview": "/build\n/src/main/assets/model_list_backup.json\n/src/main/assets/model_list_local.json"
},
{
"path": "cookbook/android/RAG-LLM/app/build.gradle.kts",
"chars": 4399,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/proguard-rules.pro",
"chars": 1333,
"preview": "# Copyright 2024-2026 Nexa AI, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "cookbook/android/RAG-LLM/app/src/androidTest/java/com/nexa/demo/ExampleInstrumentedTest.kt",
"chars": 1249,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/AndroidManifest.xml",
"chars": 2922,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2024-2026 Nexa AI, Inc.\n\n Licensed under the Apache License, Ve"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/assets/model_list.json",
"chars": 4329,
"preview": "[\n {\n \"id\": \"Llama3.2-3B-NPU-Turbo-NPU-mobile\",\n \"displayName\": \"Llama3.2-3B\",\n \"modelName\": \"files-1-2.nexa\","
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/ChatAdapter.kt",
"chars": 7100,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/FileConfig.kt",
"chars": 870,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/GenerationConfigSample.kt",
"chars": 2089,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/MainActivity.kt",
"chars": 119733,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/MyApplication.kt",
"chars": 807,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/RAGConfig.kt",
"chars": 926,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/activity/FileContentActivity.kt",
"chars": 2430,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/activity/FolderActivity.kt",
"chars": 4540,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/adapter/ChunkAdapter.kt",
"chars": 2667,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/adapter/IndexViewPagerAdapter.kt",
"chars": 1532,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/adapter/SelectImagesAdapter.kt",
"chars": 3410,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/adapter/SelectVideosAdapter.kt",
"chars": 1453,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/adapter/ShowFileDirAdapter.kt",
"chars": 2251,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/bean/DownloadFileConfig.kt",
"chars": 915,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/bean/DownloadState.kt",
"chars": 674,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/bean/DownloadableFile.kt",
"chars": 716,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/bean/EmbedFileBean.kt",
"chars": 703,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/bean/EmbedResultBean.kt",
"chars": 1867,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/bean/IndexSelectedDirBean.kt",
"chars": 834,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/bean/ModelData.kt",
"chars": 16353,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/bean/NexaManifestBean.kt",
"chars": 892,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/bean/S3FileBean.kt",
"chars": 1847,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/fragments/IndexFragment.kt",
"chars": 12096,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/fragments/IndexedImagesFragment.kt",
"chars": 2517,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/fragments/IndexedVideosFragment.kt",
"chars": 2280,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
},
{
"path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/fragments/UpdatePercentFragment.kt",
"chars": 925,
"preview": "// Copyright 2024-2026 Nexa AI, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no"
}
]
// ... and 289 more files (download for full content)
About this extraction
This page contains the full source code of the NexaAI/nexa-sdk GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 489 files (5.8 MB), approximately 1.5M tokens, and a symbol index with 8708 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.