├── .air.toml ├── .codesouler └── rules │ └── vue-unit-test-guide.md ├── .env.example ├── .envrc.example ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── docker-image-main.yml │ ├── docker-image-semantic.yml │ ├── e2e_tests.yml │ ├── golang-lint.yml │ └── unit_tests.yml ├── .gitignore ├── .gitlab-ci.yml ├── .mockery.yaml ├── .vscode └── launch.json ├── Dockerfile ├── LICENSE ├── README.md ├── README_es.md ├── README_jp.md ├── README_kr.md ├── README_zh.md ├── _mocks └── opencsg.com │ └── portal │ ├── handlers │ └── render │ │ └── mock_RenderBase.go │ └── pkg │ └── utils │ └── jwt │ └── mock_JwtUtils.go ├── cmd └── csghub-portal │ ├── cmd │ ├── migration │ │ └── migration.go │ ├── root.go │ └── start │ │ ├── server.go │ │ └── start.go │ └── main.go ├── config └── config.go ├── docs ├── CONTRIBUTING_en.md ├── all_in_one_readme_en.md ├── csghub_saas_en.md ├── csghub_saas_zh.md ├── detailed_intro_en.md ├── detailed_intro_zh.md ├── images │ ├── add_newfile.png │ ├── add_newfile_en.png │ ├── after_fintune.png │ ├── after_fintune_en.png │ ├── before_fintune.png │ ├── before_fintune_en.png │ ├── create_model_repo.png │ ├── create_model_repo_en.png │ ├── csghub_framework.png │ ├── demo-cover.jpg │ ├── discord-qrcode.png │ ├── download_file.png │ ├── download_file_en.png │ ├── download_sdk.png │ ├── download_sdk_en.png │ ├── endpoint_create.png │ ├── endpoint_create_en.png │ ├── endpoint_menu.png │ ├── endpoint_menu_en.png │ ├── endpoint_playground.png │ ├── endpoint_playground_en.png │ ├── finetune_create.png │ ├── finetune_create_en.png │ ├── finetune_llamafactory.png │ ├── finetune_llamafactory_en.png │ ├── finetune_menu.png │ ├── finetune_menu_en.png │ ├── finetune_notebook.png │ ├── finetune_notebook_en.png │ ├── fintune_result.png │ ├── fintune_result_en.png │ ├── functions.jpeg │ ├── little_asistant.jpeg │ ├── llama_para_1.png │ ├── llama_para_1_en.png │ ├── llama_para_2.png │ ├── llama_para_2_en.png │ ├── portal_tech_graph.png │ ├── project_intro.png │ ├── server_tech_graph.png │ ├── slack-qrcode.png │ ├── wechat-assistant-new.png │ ├── wechat-group-new.png │ └── wechat-group.jpeg ├── migrate_to_gin_version_portal_cn.md ├── migrate_to_gin_version_portal_en.md ├── migrate_to_gitaly_git_server_cn.md ├── migrate_to_gitaly_git_server_en.md ├── readme_cn.md ├── readme_en.md ├── readme_ja.md ├── readme_kr.md ├── release_notes.md ├── release_notes_zh.md ├── roadmap.md ├── roadmap_en.md ├── setup.md ├── setup_en.md ├── user_system_cn.md └── user_system_en.md ├── frontend ├── .gitignore ├── .tool-versions ├── .vscode │ └── extensions.json ├── embed.go ├── jsconfig.json ├── package.json ├── postcss.config.js ├── public │ └── images │ │ ├── Background-pattern-decorative.svg │ │ ├── OpenCSG_logo.svg │ │ ├── collection_half_cirle.png │ │ ├── default_cover_image copy.png │ │ ├── default_cover_image.png │ │ ├── default_org.png │ │ ├── empty-models.png │ │ ├── error_page_bg.png │ │ ├── favicon.ico │ │ ├── favicon.png │ │ ├── files │ │ └── Default.png │ │ ├── icons │ │ ├── Finished.svg │ │ ├── Processing.svg │ │ ├── Queued.svg │ │ ├── admin-menu-active-icon.svg │ │ ├── admin-menu-broadcast.svg │ │ ├── admin-menu-cloud.svg │ │ ├── admin-menu-dashboard.svg │ │ ├── admin-menu-model.svg │ │ ├── admin-menu-serverless.svg │ │ ├── admin-menu-settings.svg │ │ ├── admin-menu-tag.svg │ │ ├── admin-menu-to-left.svg │ │ ├── admin-menu-users.svg │ │ ├── alert.svg │ │ ├── api-example.svg │ │ ├── app_tokens.svg │ │ ├── arrow.svg │ │ ├── branch.svg │ │ ├── broadcast-close-dark.svg │ │ ├── broadcast-close-light.svg │ │ ├── broadcast-notice-dark.svg │ │ ├── broadcast-notice-light.svg │ │ ├── check_circle.svg │ │ ├── chevron-down.svg │ │ ├── chevron-up.svg │ │ ├── chevron_right.svg │ │ ├── clock.svg │ │ ├── clone.svg │ │ ├── close_menu.svg │ │ ├── codes.svg │ │ ├── collections.svg │ │ ├── commits.svg │ │ ├── company.svg │ │ ├── copy.svg │ │ ├── create_org_repo.svg │ │ ├── curl.svg │ │ ├── dataflow.svg │ │ ├── dataflow_alignL.svg │ │ ├── dataflow_alignR.svg │ │ ├── dataflow_backIcon.svg │ │ ├── dataflow_drag.svg │ │ ├── dataflow_homeIcon.svg │ │ ├── dataflow_homeIcon_divider.svg │ │ ├── dataflow_menuIcon.svg │ │ ├── dataflow_menuIcon_tlp.svg │ │ ├── dataflow_menuIcon_tools.svg │ │ ├── dataflow_menuline.svg │ │ ├── datasets.svg │ │ ├── deploy.svg │ │ ├── discord.svg │ │ ├── discussion-replay-icon.svg │ │ ├── discussions.svg │ │ ├── dot_black.svg │ │ ├── download.svg │ │ ├── download2.svg │ │ ├── download_dark.svg │ │ ├── edit.svg │ │ ├── edit_org_member_role.svg │ │ ├── el_upload.svg │ │ ├── endpoint.svg │ │ ├── evaluation.svg │ │ ├── evaluation_new.svg │ │ ├── exclamation_point.svg │ │ ├── extraction.svg │ │ ├── file.svg │ │ ├── finetune_cpu_icon.svg │ │ ├── finetune_create.svg │ │ ├── finetune_name_icon.svg │ │ ├── finetune_tip.svg │ │ ├── fullscreen.svg │ │ ├── github-2.svg │ │ ├── github.svg │ │ ├── huggingface.svg │ │ ├── input_tip.svg │ │ ├── instance_deploy_failed_tips.svg │ │ ├── instance_logs.svg │ │ ├── invite_org_member.svg │ │ ├── javascript.svg │ │ ├── json.svg │ │ ├── language_tag.svg │ │ ├── license.svg │ │ ├── lock-01.svg │ │ ├── login_failed.svg │ │ ├── mcp_deploy.svg │ │ ├── mcp_item_download.svg │ │ ├── mcp_item_github.svg │ │ ├── mcp_item_hybrid.svg │ │ ├── mcp_item_stars.svg │ │ ├── mcp_item_tools.svg │ │ ├── mcp_item_typescript.svg │ │ ├── menu.svg │ │ ├── metadata_GGUF.svg │ │ ├── metadata_Safetensors.svg │ │ ├── model_endpoint_create.svg │ │ ├── model_finetune_create.svg │ │ ├── model_gray.svg │ │ ├── models.svg │ │ ├── more_menu.svg │ │ ├── navbar-admin.svg │ │ ├── navbar-collection.svg │ │ ├── navbar-language.svg │ │ ├── navbar-logout.svg │ │ ├── navbar-new.svg │ │ ├── navbar-neworganization.svg │ │ ├── navbar-profile.svg │ │ ├── navbar-resource-console.svg │ │ ├── navbar-setting.svg │ │ ├── new_collection.svg │ │ ├── new_dot.svg │ │ ├── opencsg.svg │ │ ├── parquet_api.svg │ │ ├── parquet_auto_converted.svg │ │ ├── parquet_viewer.svg │ │ ├── playground.svg │ │ ├── playground_api.svg │ │ ├── playground_test.svg │ │ ├── plus.svg │ │ ├── profile_finetune.svg │ │ ├── prompt_card_settgins.svg │ │ ├── prompting_navbar.svg │ │ ├── prompts_Code.svg │ │ ├── prompts_CreativeWriting.svg │ │ ├── prompts_DataAnalysis.svg │ │ ├── prompts_Design.svg │ │ ├── prompts_Education.svg │ │ ├── prompts_Image.svg │ │ ├── prompts_Marketing.svg │ │ ├── prompts_Music.svg │ │ ├── prompts_Personalization.svg │ │ ├── prompts_Research.svg │ │ ├── prompts_TechnicalWriting.svg │ │ ├── prompts_Video.svg │ │ ├── prompts_bg.svg │ │ ├── prompts_bg_user.svg │ │ ├── prompts_copy.svg │ │ ├── prompts_file.svg │ │ ├── prompts_file_selected.svg │ │ ├── prompts_history.svg │ │ ├── prompts_layout_left.svg │ │ ├── prompts_library.svg │ │ ├── prompts_library_selected.svg │ │ ├── prompts_model_comparison.svg │ │ ├── prompts_model_comparison_selected.svg │ │ ├── prompts_optimization_assistant.svg │ │ ├── prompts_optimization_assistant_selected.svg │ │ ├── prompts_pipe.svg │ │ ├── prompts_reAnswer.svg │ │ ├── prompts_relations_library.svg │ │ ├── prompts_source.svg │ │ ├── python.svg │ │ ├── refresh.svg │ │ ├── repo_header_license_icon.svg │ │ ├── repo_opencsg_completed.svg │ │ ├── repo_opencsg_need_sync.svg │ │ ├── repo_opencsg_sync.svg │ │ ├── repo_source_huggingface.svg │ │ ├── repo_source_modelscope.svg │ │ ├── repo_source_opencsg.svg │ │ ├── repoheader_dataset.svg │ │ ├── search.svg │ │ ├── send_message.svg │ │ ├── slack.svg │ │ ├── space_docker.svg │ │ ├── space_docker_gray.svg │ │ ├── space_endpoint.svg │ │ ├── space_gradio.svg │ │ ├── space_mcp.svg │ │ ├── space_nginx.svg │ │ ├── space_static.svg │ │ ├── space_streamlit.svg │ │ ├── space_upload.svg │ │ ├── spaces.svg │ │ ├── star.svg │ │ ├── sync-diff.svg │ │ ├── sync-remote.svg │ │ ├── sync.svg │ │ ├── team_org.svg │ │ ├── text_generation.svg │ │ ├── top_right_arrow.svg │ │ ├── trash.svg │ │ ├── twitter.svg │ │ ├── upload-image.svg │ │ ├── useIcon.svg │ │ ├── verified_company.svg │ │ ├── vertical_divider.svg │ │ ├── vertical_divider2.svg │ │ └── x-close.svg │ │ ├── invite_bg.png │ │ ├── new_organization_bg.png │ │ ├── opencsg_avatar.png │ │ ├── opencsg_logo.png │ │ ├── search_circle_bg.png │ │ ├── tags │ │ ├── action-detection.svg │ │ ├── audio-classification.svg │ │ ├── auto-speech-recognition.svg │ │ ├── autonomous-driving.svg │ │ ├── biomedicine.svg │ │ ├── conversational.svg │ │ ├── document-segmentation.svg │ │ ├── face-detection.svg │ │ ├── face-image-generation.svg │ │ ├── face-recognition.svg │ │ ├── feature-extraction.svg │ │ ├── fill-mask.svg │ │ ├── image-captioning.svg │ │ ├── image-classification.svg │ │ ├── image-editing.svg │ │ ├── image-generation.svg │ │ ├── image-object-detection.svg │ │ ├── image-segmentation.svg │ │ ├── image-super-resolution.svg │ │ ├── image-text-retrieval.svg │ │ ├── image-text-to-text.svg │ │ ├── image-to-image.svg │ │ ├── image-to-text.svg │ │ ├── keyword-spotting.svg │ │ ├── multiple-choice.svg │ │ ├── named-entity-recognition.svg │ │ ├── nli.svg │ │ ├── object-detection.svg │ │ ├── object-tracking.svg │ │ ├── ocr.svg │ │ ├── part-of-speech.svg │ │ ├── protein-structure.svg │ │ ├── question-answering.svg │ │ ├── relation-extraction.svg │ │ ├── semantic-segmentation.svg │ │ ├── sentence-similarity.svg │ │ ├── sentiment-classification.svg │ │ ├── skin-retouching.svg │ │ ├── speech-signal-process.svg │ │ ├── summarization.svg │ │ ├── table-question-answering.svg │ │ ├── text-classification.svg │ │ ├── text-generation.svg │ │ ├── text-retrieval.svg │ │ ├── text-summarization.svg │ │ ├── text-to-image.svg │ │ ├── text-to-speech.svg │ │ ├── token-classification.svg │ │ ├── translation.svg │ │ ├── video-captioning.svg │ │ ├── video-classification.svg │ │ ├── video-detection.svg │ │ ├── video-generation.svg │ │ ├── video-segmentation.svg │ │ ├── video-super-resolution.svg │ │ ├── visual-grounding.svg │ │ ├── visual-question-answering.svg │ │ ├── voice-activity-detection.svg │ │ ├── word-segmentation.svg │ │ └── zero-shot.svg │ │ └── vite.svg ├── setupTests.js ├── src │ ├── admin.js │ ├── assets │ │ ├── images │ │ │ ├── .keep │ │ │ ├── default_cover_image.png │ │ │ ├── favicon.png │ │ │ ├── new_organization_bg.png │ │ │ └── opencsg_logo.png │ │ ├── stylesheets │ │ │ ├── element-plus │ │ │ │ ├── _variables.css │ │ │ │ ├── application.css │ │ │ │ ├── button.css │ │ │ │ ├── el-message-box.css │ │ │ │ ├── index.css │ │ │ │ ├── input.css │ │ │ │ ├── menu.css │ │ │ │ └── upload.css │ │ │ └── markdown.css │ │ └── vue.svg │ ├── components │ │ ├── HelloWorld.vue │ │ ├── OnPremiseFooter.vue │ │ ├── __tests__ │ │ │ ├── application_spaces │ │ │ │ ├── ApplicationPage.spec.js │ │ │ │ ├── ApplicationSpaceSettings.spec.js │ │ │ │ ├── NewApplicationSpace.spec.js │ │ │ │ └── SpaceRelationsCard.spec.js │ │ │ ├── codes │ │ │ │ ├── CodeRelationsCard.spec.js │ │ │ │ ├── CodeSettings.spec.js │ │ │ │ └── NewCode.spec.js │ │ │ ├── collections │ │ │ │ └── NewCollection.spec.js │ │ │ ├── datasets │ │ │ │ ├── DatasetRelationsCard.spec.js │ │ │ │ ├── DatasetSettings.spec.js │ │ │ │ └── NewDataset.spec.js │ │ │ ├── endpoints │ │ │ │ ├── EndpointDetail.spec.js │ │ │ │ ├── EndpointItem.spec.js │ │ │ │ ├── EndpointLogs.spec.js │ │ │ │ ├── EndpointPage.spec.js │ │ │ │ ├── EndpointPlayground.spec.js │ │ │ │ ├── EndpointSettings.spec.js │ │ │ │ └── NewEndpoint.spec.js │ │ │ ├── evaluations │ │ │ │ ├── EvaluationDetail.spec.js │ │ │ │ └── NewEvaluation.spec.js │ │ │ ├── finetune │ │ │ │ ├── FinetuneDetail.spec.js │ │ │ │ ├── FinetuneSettings.spec.js │ │ │ │ └── NewFinetune.spec.js │ │ │ ├── models │ │ │ │ ├── ModelRelationsCard.spec.js │ │ │ │ ├── ModelSettings.spec.js │ │ │ │ ├── NewModel.spec.js │ │ │ │ └── widgets │ │ │ │ │ └── QuestionAnswer.spec.js │ │ │ ├── organizations │ │ │ │ ├── NewOrganization.spec.js │ │ │ │ ├── OrganizationDetail.spec.js │ │ │ │ └── OrganizationSettings.spec.js │ │ │ ├── shared │ │ │ │ ├── RepoCards.spec.js │ │ │ │ └── RepoHeader.spec.js │ │ │ └── user_settings │ │ │ │ ├── Menu.spec.js │ │ │ │ ├── Profile.spec.js │ │ │ │ └── ProfileEdit.spec.js │ │ ├── admin_next │ │ │ ├── admin_component │ │ │ │ ├── Card │ │ │ │ │ └── Card.vue │ │ │ │ ├── Container.vue │ │ │ │ ├── Layout.vue │ │ │ │ ├── Menu.vue │ │ │ │ ├── Navbar │ │ │ │ │ └── Navbar.vue │ │ │ │ ├── Pagination │ │ │ │ │ ├── NextButton.vue │ │ │ │ │ ├── Pagination.vue │ │ │ │ │ └── PrevButton.vue │ │ │ │ ├── Table │ │ │ │ │ └── Table.vue │ │ │ │ └── index.js │ │ │ ├── broadcast │ │ │ │ ├── AdminBroadcastEdit.vue │ │ │ │ ├── AdminBroadcastList.vue │ │ │ │ └── AdminBroadcastNew.vue │ │ │ ├── dashboard │ │ │ │ └── AdminDashboard.vue │ │ │ ├── models │ │ │ │ ├── AdminModelDetail.vue │ │ │ │ ├── AdminModelEdit.vue │ │ │ │ └── AdminModelList.vue │ │ │ ├── router │ │ │ │ └── index.js │ │ │ ├── serverless │ │ │ │ ├── AdminServerlessDetail.vue │ │ │ │ ├── AdminServerlessForm.vue │ │ │ │ ├── AdminServerlessList.vue │ │ │ │ └── AdminServerlessLogs.vue │ │ │ ├── sync │ │ │ │ └── AdminSyncSetting.vue │ │ │ ├── system_configs │ │ │ │ └── AdminSystemConfig.vue │ │ │ ├── tag_categories │ │ │ │ ├── AdminTagCategoriesForm.vue │ │ │ │ └── AdminTagCategoriesList.vue │ │ │ ├── tags │ │ │ │ ├── AdminTagsDetail.vue │ │ │ │ ├── AdminTagsForm.vue │ │ │ │ └── AdminTagsList.vue │ │ │ └── users │ │ │ │ ├── AdminUserDetail.vue │ │ │ │ └── AdminUserList.vue │ │ ├── application_spaces │ │ │ ├── AppPayMode.vue │ │ │ ├── AppStatus.vue │ │ │ ├── ApplicationPage.vue │ │ │ ├── ApplicationSpaceDetail.vue │ │ │ ├── ApplicationSpaceItem.vue │ │ │ ├── ApplicationSpaceSettings.vue │ │ │ ├── BuildAndErrorPage.vue │ │ │ ├── BuildStatus.vue │ │ │ ├── ErrorStatus.vue │ │ │ ├── GradioInitializeGuide.vue │ │ │ ├── InitializeGuide.vue │ │ │ ├── McpSpaceExample.vue │ │ │ ├── McpSpacePage.vue │ │ │ ├── NewApplicationSpace.vue │ │ │ ├── SpaceRelationsCard.vue │ │ │ ├── StoppedPage.vue │ │ │ ├── StreamlitInitializeGuide.vue │ │ │ ├── SuccessStatus.vue │ │ │ └── WarningStatus.vue │ │ ├── codes │ │ │ ├── CodeRelationsCard.vue │ │ │ ├── CodeSettings.vue │ │ │ └── NewCode.vue │ │ ├── collections │ │ │ ├── AddToCollections.vue │ │ │ ├── CollectionCard.vue │ │ │ ├── CollectionCards.vue │ │ │ ├── CollectionIndex.vue │ │ │ ├── CollectionsAddRepo.vue │ │ │ ├── CollectionsDetail.vue │ │ │ ├── CollectionsRepoList.vue │ │ │ ├── CollectionsSettings.vue │ │ │ └── NewCollection.vue │ │ ├── comment │ │ │ ├── CommentItem.vue │ │ │ ├── CommentList.vue │ │ │ └── CreateComment.vue │ │ ├── community │ │ │ ├── CommunityMDTextarea.vue │ │ │ ├── CommunityPage.vue │ │ │ ├── CommunityTimeLine.vue │ │ │ ├── DiscussionCard.vue │ │ │ ├── DiscussionCards.vue │ │ │ ├── DiscussionDetails.vue │ │ │ ├── EmptyCommunity.vue │ │ │ └── NewCommunityDiscussion.vue │ │ ├── dataflow_config │ │ │ ├── Menu.vue │ │ │ ├── algTemplate │ │ │ │ ├── index.vue │ │ │ │ └── newTemplate.vue │ │ │ ├── dataflow │ │ │ │ ├── index.vue │ │ │ │ └── info.vue │ │ │ ├── newTask │ │ │ │ └── index.vue │ │ │ └── tools │ │ │ │ └── index.vue │ │ ├── datasets │ │ │ ├── DatasetRelationsCard.vue │ │ │ ├── DatasetSettings.vue │ │ │ ├── NewDataset.vue │ │ │ └── ParquetViewer.vue │ │ ├── endpoints │ │ │ ├── EndpointDetail.vue │ │ │ ├── EndpointItem.vue │ │ │ ├── EndpointLogs.vue │ │ │ ├── EndpointPage.vue │ │ │ ├── EndpointPlayground.vue │ │ │ ├── EndpointSettings.vue │ │ │ ├── EngineArgs.vue │ │ │ ├── NewEndpoint.vue │ │ │ └── playground │ │ │ │ ├── ApiExample.vue │ │ │ │ ├── ApiExtraction.vue │ │ │ │ ├── ApiImageText.vue │ │ │ │ ├── ApiWidget.vue │ │ │ │ ├── TestEndpoint.vue │ │ │ │ ├── TestExtraction.vue │ │ │ │ ├── TestImageText.vue │ │ │ │ └── TestWidget.vue │ │ ├── error │ │ │ ├── LoginFailed.vue │ │ │ ├── NotFound.vue │ │ │ ├── ServerError.vue │ │ │ └── Unauthorized.vue │ │ ├── evaluations │ │ │ ├── EvaluationDetail.vue │ │ │ └── NewEvaluation.vue │ │ ├── finetune │ │ │ ├── FinetuneDetail.vue │ │ │ ├── FinetuneSettings.vue │ │ │ └── NewFinetune.vue │ │ ├── form │ │ │ └── sub │ │ │ │ └── FormLabel.vue │ │ ├── images │ │ │ ├── BackgroundPattern.png │ │ │ └── opencsg_logo.png │ │ ├── mcp │ │ │ ├── DeployMcpServer.vue │ │ │ ├── McpItem.vue │ │ │ ├── McpSchema.vue │ │ │ ├── McpSettings.vue │ │ │ ├── McpToolDetail.vue │ │ │ ├── McpToolItem.vue │ │ │ ├── McpTools.vue │ │ │ ├── NewMcpServer.vue │ │ │ ├── SchemaTable.vue │ │ │ └── ToolNameCell.vue │ │ ├── models │ │ │ ├── EmptyModels.vue │ │ │ ├── ModelMetadata.vue │ │ │ ├── ModelRelationsCard.vue │ │ │ ├── ModelSettings.vue │ │ │ ├── NewModel.vue │ │ │ ├── metadata │ │ │ │ └── MetaItem.vue │ │ │ └── widgets │ │ │ │ └── QuestionAnswer.vue │ │ ├── navbar │ │ │ ├── Broadcast.vue │ │ │ ├── CodeNav.vue │ │ │ ├── Collection.vue │ │ │ ├── MenuItems.vue │ │ │ ├── Navbar.vue │ │ │ ├── dataset.vue │ │ │ ├── docs.vue │ │ │ ├── menuItem │ │ │ │ ├── Mcp.vue │ │ │ │ └── McpTools.vue │ │ │ ├── model.vue │ │ │ └── space.vue │ │ ├── new_admin │ │ │ ├── AdminDashboard.vue │ │ │ ├── AdminEmailSending.vue │ │ │ ├── AdminMenu.vue │ │ │ ├── AdminNavbar.vue │ │ │ ├── sync │ │ │ │ └── AdminSyncSetting.vue │ │ │ ├── system_configs │ │ │ │ └── AdminSystemConfig.vue │ │ │ └── users │ │ │ │ ├── AdminUserDetail.vue │ │ │ │ └── AdminUserList.vue │ │ ├── organizations │ │ │ ├── InviteMember.vue │ │ │ ├── Menu.vue │ │ │ ├── NewOrganization.vue │ │ │ ├── OrgMemberRoleEditDialog.vue │ │ │ ├── OrganizationDetail.vue │ │ │ ├── OrganizationEdit.vue │ │ │ ├── OrganizationMembers.vue │ │ │ └── OrganizationSettings.vue │ │ ├── popup │ │ │ └── UpdateUsername.vue │ │ ├── prompts │ │ │ ├── EditPrompt.vue │ │ │ ├── NewPrompt.vue │ │ │ ├── NewPromptsList.vue │ │ │ ├── PromptRelationsCard.vue │ │ │ ├── PromptsBreadCrumbs.vue │ │ │ ├── PromptsCard.vue │ │ │ ├── PromptsChat.vue │ │ │ ├── PromptsDatasetsCard.vue │ │ │ ├── PromptsDetails.vue │ │ │ ├── PromptsHub.vue │ │ │ ├── PromptsIndex.vue │ │ │ ├── PromptsLibrary.vue │ │ │ ├── PromptsList.vue │ │ │ ├── PromptsListSettings.vue │ │ │ ├── PromptsMenu.vue │ │ │ ├── PromptsMobileMenu.vue │ │ │ ├── PromptsTags.vue │ │ │ └── promptsOptions.js │ │ ├── resource_console │ │ │ ├── EvaluationTable.vue │ │ │ └── ResourceConsoleIndex.vue │ │ ├── shared │ │ │ ├── BillingDetail.vue │ │ │ ├── Blob.vue │ │ │ ├── BranchDropdown.vue │ │ │ ├── CodeEditor.vue │ │ │ ├── CsgButton.vue │ │ │ ├── CsgPagination.vue │ │ │ ├── DeployDropdown.vue │ │ │ ├── EditFile.vue │ │ │ ├── FileList.vue │ │ │ ├── FinetuneItem.vue │ │ │ ├── FlashMessage.vue │ │ │ ├── HeaderTags.vue │ │ │ ├── InstanceAnalysis.vue │ │ │ ├── InstanceInBuilding.vue │ │ │ ├── MoreTags.vue │ │ │ ├── NewFile.vue │ │ │ ├── NewTag.vue │ │ │ ├── Next.vue │ │ │ ├── Previous.vue │ │ │ ├── ProfileRepoList.vue │ │ │ ├── RepoCards.vue │ │ │ ├── RepoClone.vue │ │ │ ├── RepoCommit.vue │ │ │ ├── RepoCommits.vue │ │ │ ├── RepoDetail.vue │ │ │ ├── RepoFiles.vue │ │ │ ├── RepoHeader.vue │ │ │ ├── RepoHeaderSourceIcon.vue │ │ │ ├── RepoItem.vue │ │ │ ├── RepoItemSyncIcon.vue │ │ │ ├── RepoSummary.vue │ │ │ ├── RepoSummaryApiExample.vue │ │ │ ├── RepoTabs.vue │ │ │ ├── SvgIcon.vue │ │ │ ├── SyncDropdown.vue │ │ │ ├── TabContainer.vue │ │ │ ├── UploadFile.vue │ │ │ ├── ViewMore.vue │ │ │ ├── deploy_instance │ │ │ │ └── fetchResourceInCategory.js │ │ │ ├── form │ │ │ │ └── PublicAndPrivateRadioGroup.vue │ │ │ ├── inputs │ │ │ │ └── InputTip.vue │ │ │ └── viewers │ │ │ │ ├── CodeViewer.vue │ │ │ │ ├── DarkCodeViewer.vue │ │ │ │ ├── MarkdownViewer.vue │ │ │ │ └── TextViewer.vue │ │ ├── tags │ │ │ ├── LanguageTagItem.vue │ │ │ ├── LicenseTagItem.vue │ │ │ ├── TagCategory.vue │ │ │ ├── TagItem.vue │ │ │ ├── TagList.vue │ │ │ ├── TagSidebar.vue │ │ │ ├── TaskTagItem.vue │ │ │ └── frameworks │ │ │ │ ├── GGUF.vue │ │ │ │ ├── JAX.vue │ │ │ │ ├── Joblib.vue │ │ │ │ ├── ONNX.vue │ │ │ │ ├── PaddlePaddle.vue │ │ │ │ ├── PyTorch.vue │ │ │ │ ├── Safetensors.vue │ │ │ │ └── TensorFlow.vue │ │ └── user_settings │ │ │ ├── AccessTokenSettings.vue │ │ │ ├── Menu.vue │ │ │ ├── Profile.vue │ │ │ ├── ProfileEdit.vue │ │ │ ├── ProfileSettings.vue │ │ │ ├── SshKeyCard.vue │ │ │ └── SshKeySettings.vue │ ├── locales │ │ ├── en.js │ │ ├── en_js │ │ │ ├── accessToken.js │ │ │ ├── admin.js │ │ │ ├── all.js │ │ │ ├── application_spaces.js │ │ │ ├── billing.js │ │ │ ├── codes.js │ │ │ ├── collections.js │ │ │ ├── comment.js │ │ │ ├── community.js │ │ │ ├── components.js │ │ │ ├── datapipelines.js │ │ │ ├── datasets.js │ │ │ ├── endpoints.js │ │ │ ├── error.js │ │ │ ├── evaluation.js │ │ │ ├── finetune.js │ │ │ ├── languages.js │ │ │ ├── mcp_servers.js │ │ │ ├── models.js │ │ │ ├── navbar.js │ │ │ ├── operator_en.json │ │ │ ├── organization.js │ │ │ ├── profile.js │ │ │ ├── prompts.js │ │ │ ├── repo.js │ │ │ ├── resource_console.js │ │ │ ├── rule.js │ │ │ ├── shared.js │ │ │ ├── spaces.js │ │ │ ├── sshKey.js │ │ │ ├── tags.js │ │ │ ├── user_sessions.js │ │ │ └── widgets.js │ │ ├── zh.js │ │ ├── zhHant.js │ │ ├── zh_hant_js │ │ │ ├── accessToken.js │ │ │ ├── admin.js │ │ │ ├── all.js │ │ │ ├── application_spaces.js │ │ │ ├── billing.js │ │ │ ├── blog.js │ │ │ ├── campaign.js │ │ │ ├── codes.js │ │ │ ├── collections.js │ │ │ ├── comment.js │ │ │ ├── community.js │ │ │ ├── components.js │ │ │ ├── datapipelines.js │ │ │ ├── datasets.js │ │ │ ├── endpoints.js │ │ │ ├── error.js │ │ │ ├── evaluation.js │ │ │ ├── experts.js │ │ │ ├── finetune.js │ │ │ ├── languages.js │ │ │ ├── mcp_servers.js │ │ │ ├── models.js │ │ │ ├── navbar.js │ │ │ ├── operator_zh copy.json │ │ │ ├── operator_zh.json │ │ │ ├── organization.js │ │ │ ├── profile.js │ │ │ ├── prompts.js │ │ │ ├── repo.js │ │ │ ├── resource_console.js │ │ │ ├── rule.js │ │ │ ├── shared.js │ │ │ ├── spaces.js │ │ │ ├── sshKey.js │ │ │ ├── tags.js │ │ │ ├── user_sessions.js │ │ │ └── widgets.js │ │ └── zh_js │ │ │ ├── accessToken.js │ │ │ ├── admin.js │ │ │ ├── all.js │ │ │ ├── application_spaces.js │ │ │ ├── billing.js │ │ │ ├── codes.js │ │ │ ├── collections.js │ │ │ ├── comment.js │ │ │ ├── community.js │ │ │ ├── components.js │ │ │ ├── datapipelines.js │ │ │ ├── datasets.js │ │ │ ├── endpoints.js │ │ │ ├── error.js │ │ │ ├── evaluation.js │ │ │ ├── finetune.js │ │ │ ├── languages.js │ │ │ ├── mcp_servers.js │ │ │ ├── models.js │ │ │ ├── navbar.js │ │ │ ├── operator_zh.json │ │ │ ├── organization.js │ │ │ ├── profile.js │ │ │ ├── prompts.js │ │ │ ├── repo.js │ │ │ ├── resource_console.js │ │ │ ├── rule.js │ │ │ ├── shared.js │ │ │ ├── spaces.js │ │ │ ├── sshKey.js │ │ │ ├── tags.js │ │ │ ├── user_sessions.js │ │ │ └── widgets.js │ ├── main.js │ ├── packs │ │ ├── auth.js │ │ ├── buildTags.js │ │ ├── clipboard.js │ │ ├── csrfFetch.js │ │ ├── datetimeUtils.js │ │ ├── jwtFetch.js │ │ ├── persistPinia.js │ │ ├── refreshJWT.js │ │ ├── resolveContent.js │ │ ├── typewriter.js │ │ ├── useEngineArgs.js │ │ ├── useFetchApi.js │ │ └── utils.js │ ├── stores │ │ ├── RepoDetailStore.js │ │ ├── RepoTabStore.js │ │ ├── UserStore.js │ │ └── useGlobalStore.js │ ├── style.css │ ├── styles │ │ └── codediff.css │ └── views │ │ ├── admin │ │ ├── admin_next.html │ │ ├── index.html │ │ └── layouts │ │ │ └── base.html │ │ ├── codes │ │ ├── index.html │ │ ├── new.html │ │ └── show.html │ │ ├── collections │ │ ├── index.html │ │ ├── new.html │ │ └── show.html │ │ ├── datapipelines │ │ ├── index.html │ │ └── layouts │ │ │ └── base.html │ │ ├── datasets │ │ ├── index.html │ │ ├── new.html │ │ └── show.html │ │ ├── endpoints │ │ ├── new.html │ │ └── show.html │ │ ├── errors │ │ ├── 404.html │ │ ├── login_failed.html │ │ ├── server_error.html │ │ └── unauthorized.html │ │ ├── evaluations │ │ ├── new.html │ │ └── show.html │ │ ├── finetunes │ │ ├── new.html │ │ └── show.html │ │ ├── home │ │ └── index.html │ │ ├── layouts │ │ ├── base.html │ │ ├── footer.html │ │ └── navbar.html │ │ ├── mcp_servers │ │ ├── deploy.html │ │ ├── index.html │ │ ├── new.html │ │ ├── show.html │ │ └── tools.html │ │ ├── models │ │ ├── index.html │ │ ├── new.html │ │ └── show.html │ │ ├── organizations │ │ ├── new.html │ │ ├── settings.html │ │ └── show.html │ │ ├── profile │ │ ├── likes.html │ │ └── profile.html │ │ ├── prompts │ │ └── index.html │ │ ├── resource-console │ │ └── index.html │ │ ├── settings │ │ ├── access_token.html │ │ ├── profile.html │ │ ├── ssh_keys.html │ │ ├── starship_access_token.html │ │ └── sync_access_token.html │ │ └── spaces │ │ ├── index.html │ │ ├── new.html │ │ └── show.html ├── tailwind.config.js ├── vite.config.js ├── vitest.config.js └── yarn.lock ├── go.mod ├── go.sum ├── internal ├── handlers │ ├── admin │ │ └── .keep │ ├── frontend │ │ ├── ping.go │ │ ├── registry.go │ │ ├── resolve.go │ │ ├── settings.go │ │ ├── token.go │ │ └── upload.go │ └── render │ │ ├── admin.go │ │ ├── admin_test.go │ │ ├── base.go │ │ ├── codes.go │ │ ├── collections.go │ │ ├── datapipelines.go │ │ ├── datasets.go │ │ ├── endpoint.go │ │ ├── error.go │ │ ├── evaluation.go │ │ ├── finetune.go │ │ ├── mcp_server.go │ │ ├── models.go │ │ ├── organization.go │ │ ├── profile.go │ │ ├── prompts.go │ │ ├── registry.go │ │ ├── repo.go │ │ ├── resource_console.go │ │ ├── session.go │ │ ├── settings.go │ │ └── spaces.go ├── httpbase │ └── graceful_server.go ├── middleware │ ├── auth_middleware.go │ ├── cache_control.go │ ├── log.go │ └── middleware.go ├── models │ ├── common.go │ └── user.go ├── routes │ ├── admin.go │ ├── codes.go │ ├── collections.go │ ├── datapipelines.go │ ├── datasets.go │ ├── endpoint.go │ ├── error.go │ ├── evaluation.go │ ├── finetune.go │ ├── home.go │ ├── mcp_server.go │ ├── models.go │ ├── organization.go │ ├── profile.go │ ├── prompts.go │ ├── resource_console.go │ ├── router.go │ ├── session.go │ ├── setting.go │ └── spaces.go ├── services │ └── .keep └── svc │ └── serviceContext.go ├── makefile └── pkg ├── database ├── db.go └── migrations │ ├── 20240902082008_create_admin_photo.go │ ├── migrate.go │ └── placeholder.sql ├── s3 ├── minio.go └── upload.go ├── server ├── backend │ ├── csghubserver │ │ ├── csghubserver.go │ │ ├── download.go │ │ ├── jwt.go │ │ ├── sensitive_check.go │ │ └── user.go │ └── interface.go ├── server.go └── types │ ├── download.go │ ├── jwt.go │ ├── sensitive.go │ └── user.go ├── testutils └── testutils.go ├── types ├── constants.go ├── enum │ └── enum.go └── errors.go └── utils ├── jwt └── jwt.go └── utils.go /.env.example: -------------------------------------------------------------------------------- 1 | CSGHUB_PORTAL_ON_PREMISE=true 2 | CSGHUB_PORTAL_SENSITIVE_CHECK=false 3 | CSGHUB_PORTAL_STARHUB_BASE_URL=http://localhost:8080 4 | CSGHUB_PORTAL_STARHUB_API_KEY=f3a7b9c1d6e5f8e2a1b5d4f9e6a2b8d7c3a4e2b1d9f6e7a8d2c5a7b4c1e3f5b8a1d4f9b7d6e2f8a5d3b1e7f9c6a8b2d1e4f7d5b6e9f2a4b3c8e1d7f995hd82hf 5 | CSGHUB_PORTAL_ENABLE_HTTPS=true 6 | CSGHUB_PORTAL_DATABASE_DSN=postgresql://postgres:postgres@localhost:5432/csghub_development?sslmode=disable 7 | CSGHUB_PORTAL_DATABASE_DIALECT=pg 8 | CSGHUB_PORTAL_SIGNUP_URL= 9 | CSGHUB_PORTAL_LOGIN_URL= 10 | CSGHUB_PORTAL_S3_ENABLE_SSL=true 11 | CSGHUB_PORTAL_S3_REGION= 12 | CSGHUB_PORTAL_S3_ACCESS_KEY_ID= 13 | CSGHUB_PORTAL_S3_ACCESS_KEY_SECRET= 14 | CSGHUB_PORTAL_S3_BUCKET= 15 | CSGHUB_PORTAL_S3_ENDPOINT= 16 | -------------------------------------------------------------------------------- /.envrc.example: -------------------------------------------------------------------------------- 1 | export CSGHUB_PORTAL_ON_PREMISE=true 2 | export CSGHUB_PORTAL_SENSITIVE_CHECK=false 3 | export CSGHUB_PORTAL_STARHUB_BASE_URL=http://localhost:8080 4 | export CSGHUB_PORTAL_STARHUB_API_KEY=f3a7b9c1d6e5f8e2a1b5d4f9e6a2b8d7c3a4e2b1d9f6e7a8d2c5a7b4c1e3f5b8a1d4f9b7d6e2f8a5d3b1e7f9c6a8b2d1e4f7d5b6e9f2a4b3c8e1d7f995hd82hf 5 | export CSGHUB_PORTAL_ENABLE_HTTPS=true 6 | export CSGHUB_PORTAL_DATABASE_DSN=postgresql://postgres:postgres@localhost:5432/csghub_development?sslmode=disable 7 | export CSGHUB_PORTAL_DATABASE_DIALECT=pg 8 | export CSGHUB_PORTAL_SIGNUP_URL= 9 | export CSGHUB_PORTAL_LOGIN_URL= 10 | export CSGHUB_PORTAL_S3_ENABLE_SSL=true 11 | export CSGHUB_PORTAL_S3_REGION= 12 | export CSGHUB_PORTAL_S3_ACCESS_KEY_ID= 13 | export CSGHUB_PORTAL_S3_ACCESS_KEY_SECRET= 14 | export CSGHUB_PORTAL_S3_BUCKET= 15 | export CSGHUB_PORTAL_S3_ENDPOINT= 16 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | *.vue @zhendi @ice201508 @jialudev @ymh6315431 @yoiteyou @hiveer 2 | *.js @zhendi @ice201508 @jialudev @ymh6315431 @yoiteyou @hiveer 3 | *.ts @zhendi @ice201508 @jialudev @ymh6315431 @yoiteyou @hiveer 4 | *.html @zhendi @ice201508 @jialudev @ymh6315431 @yoiteyou @hiveer 5 | 6 | *.go @zhendi @ice201508 @jialudev @ymh6315431 @yoiteyou @hiveer 7 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report in English to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 12 | **Describe the bug** 13 | A clear and concise description of what the bug is. 14 | 15 | **Environment** 16 | CSGHub Version: v0.7|v0.8|... 17 | OS: Linux | Windows | MacOS.. 18 | Hardware: 2c4G | 4c8G |... 19 | Launch: docker compose | helm chart 20 | 21 | 22 | **To Reproduce** 23 | Steps to reproduce the behavior: 24 | 1. Go to '...' 25 | 2. Click on '....' 26 | 3. Scroll down to '....' 27 | 4. See error 28 | 29 | **Expected behavior** 30 | A clear and concise description of what you expected to happen. 31 | 32 | **Screenshots** 33 | If applicable, add screenshots to help explain your problem. 34 | 35 | **Additional context** 36 | Add any other context about the problem here. 37 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature enhancement request 3 | about: Suggest an idea in English for this project 4 | 5 | --- 6 | 9 | 10 | /kind feature 11 | 12 | **Describe the solution you'd like** 13 | [A clear and concise description of what you want to happen.] 14 | 15 | 16 | **Anything else you would like to add:** 17 | [Miscellaneous information that will assist in solving the issue.] 18 | 19 | 20 | **Links to the design documents or others:** 21 | -------------------------------------------------------------------------------- /.github/workflows/golang-lint.yml: -------------------------------------------------------------------------------- 1 | name: Go Lint 2 | 3 | on: 4 | pull_request: 5 | branches: [ main ] 6 | 7 | jobs: 8 | lint: 9 | name: Lint Go Code 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v2 13 | 14 | - name: Set up Go 15 | uses: actions/setup-go@v2 16 | with: 17 | go-version: '^1.22' 18 | 19 | #- name: Run golangci-lint 20 | # uses: golangci/golangci-lint-action@v2 21 | # with: 22 | # version: v1.43 23 | -------------------------------------------------------------------------------- /.mockery.yaml: -------------------------------------------------------------------------------- 1 | with-expecter: true 2 | dir: "_mocks/{{.PackagePath}}" 3 | packages: 4 | opencsg.com/portal/pkg/utils/jwt: 5 | config: 6 | interfaces: 7 | AdminHandler: 8 | opencsg.com/portal/internal/handlers/render/base: 9 | config: 10 | interfaces: 11 | RenderBase: -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM --platform=$BUILDPLATFORM opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/go-node AS builder 2 | ARG TARGETPLATFORM 3 | ARG BUILDPLATFORM 4 | 5 | RUN mkdir /myapp 6 | WORKDIR /myapp 7 | ADD . /myapp 8 | 9 | ENV CGO_ENABLED=0 10 | RUN go mod tidy 11 | RUN cd frontend && yarn install && yarn build 12 | RUN GOOS=$(echo ${TARGETPLATFORM} | cut -f1 -d '/') \ 13 | GOARCH=$(echo ${TARGETPLATFORM} | cut -f2 -d '/') \ 14 | go build -o csghub-portal ./cmd/csghub-portal 15 | 16 | FROM bitnami/minideb:latest 17 | RUN apt update && apt install -y ca-certificates && update-ca-certificates 18 | WORKDIR /myapp 19 | COPY --from=builder /myapp/csghub-portal /myapp/csghub-portal -------------------------------------------------------------------------------- /cmd/csghub-portal/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "context" 5 | "os" 6 | 7 | "opencsg.com/portal/cmd/csghub-portal/cmd" 8 | ) 9 | 10 | func main() { 11 | command := cmd.RootCmd 12 | if err := command.ExecuteContext(context.Background()); err != nil { 13 | os.Exit(1) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /docs/images/add_newfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/add_newfile.png -------------------------------------------------------------------------------- /docs/images/add_newfile_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/add_newfile_en.png -------------------------------------------------------------------------------- /docs/images/after_fintune.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/after_fintune.png -------------------------------------------------------------------------------- /docs/images/after_fintune_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/after_fintune_en.png -------------------------------------------------------------------------------- /docs/images/before_fintune.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/before_fintune.png -------------------------------------------------------------------------------- /docs/images/before_fintune_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/before_fintune_en.png -------------------------------------------------------------------------------- /docs/images/create_model_repo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/create_model_repo.png -------------------------------------------------------------------------------- /docs/images/create_model_repo_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/create_model_repo_en.png -------------------------------------------------------------------------------- /docs/images/csghub_framework.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/csghub_framework.png -------------------------------------------------------------------------------- /docs/images/demo-cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/demo-cover.jpg -------------------------------------------------------------------------------- /docs/images/discord-qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/discord-qrcode.png -------------------------------------------------------------------------------- /docs/images/download_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/download_file.png -------------------------------------------------------------------------------- /docs/images/download_file_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/download_file_en.png -------------------------------------------------------------------------------- /docs/images/download_sdk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/download_sdk.png -------------------------------------------------------------------------------- /docs/images/download_sdk_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/download_sdk_en.png -------------------------------------------------------------------------------- /docs/images/endpoint_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/endpoint_create.png -------------------------------------------------------------------------------- /docs/images/endpoint_create_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/endpoint_create_en.png -------------------------------------------------------------------------------- /docs/images/endpoint_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/endpoint_menu.png -------------------------------------------------------------------------------- /docs/images/endpoint_menu_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/endpoint_menu_en.png -------------------------------------------------------------------------------- /docs/images/endpoint_playground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/endpoint_playground.png -------------------------------------------------------------------------------- /docs/images/endpoint_playground_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/endpoint_playground_en.png -------------------------------------------------------------------------------- /docs/images/finetune_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/finetune_create.png -------------------------------------------------------------------------------- /docs/images/finetune_create_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/finetune_create_en.png -------------------------------------------------------------------------------- /docs/images/finetune_llamafactory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/finetune_llamafactory.png -------------------------------------------------------------------------------- /docs/images/finetune_llamafactory_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/finetune_llamafactory_en.png -------------------------------------------------------------------------------- /docs/images/finetune_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/finetune_menu.png -------------------------------------------------------------------------------- /docs/images/finetune_menu_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/finetune_menu_en.png -------------------------------------------------------------------------------- /docs/images/finetune_notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/finetune_notebook.png -------------------------------------------------------------------------------- /docs/images/finetune_notebook_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/finetune_notebook_en.png -------------------------------------------------------------------------------- /docs/images/fintune_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/fintune_result.png -------------------------------------------------------------------------------- /docs/images/fintune_result_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/fintune_result_en.png -------------------------------------------------------------------------------- /docs/images/functions.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/functions.jpeg -------------------------------------------------------------------------------- /docs/images/little_asistant.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/little_asistant.jpeg -------------------------------------------------------------------------------- /docs/images/llama_para_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/llama_para_1.png -------------------------------------------------------------------------------- /docs/images/llama_para_1_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/llama_para_1_en.png -------------------------------------------------------------------------------- /docs/images/llama_para_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/llama_para_2.png -------------------------------------------------------------------------------- /docs/images/llama_para_2_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/llama_para_2_en.png -------------------------------------------------------------------------------- /docs/images/portal_tech_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/portal_tech_graph.png -------------------------------------------------------------------------------- /docs/images/project_intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/project_intro.png -------------------------------------------------------------------------------- /docs/images/server_tech_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/server_tech_graph.png -------------------------------------------------------------------------------- /docs/images/slack-qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/slack-qrcode.png -------------------------------------------------------------------------------- /docs/images/wechat-assistant-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/wechat-assistant-new.png -------------------------------------------------------------------------------- /docs/images/wechat-group-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/wechat-group-new.png -------------------------------------------------------------------------------- /docs/images/wechat-group.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/docs/images/wechat-group.jpeg -------------------------------------------------------------------------------- /docs/migrate_to_gin_version_portal_cn.md: -------------------------------------------------------------------------------- 1 | # 迁移到 Gin 版本 2 | 3 | 首先我们假设,我们假设您已经部署好了一个 Rails 版本的 CSGHub Portal。 4 | 5 | ## 拉取最新的仓库,默认使用 Gin 版本 6 | 7 | ```bash 8 | git fetch origin 9 | git reset --hard origin/main 10 | ``` 11 | 12 | 通过此代码,您可以将本地的 `main` 分支重置为远程的 `main` 分支,同时还会拉取一个名为 `rails-main 的分支`,其中包含旧的 Rails 版本代码。 13 | 14 | ## 部署 Gin Server 15 | 16 | 请参考[该文档](https://github.com/OpenCSGs/csghub/blob/main/docs/setup.md)部署你的 Gin 服务器。默认情况下 Gin 会使用 `8090` 端口。 17 | 18 | ### 数据库设置 19 | 20 | 您可以通过环境变量 `CSGHUB_PORTAL_DATABASE_DSN` 来设置数据库连接。可以使用和 Rails 版本相同的数据库,因为我们已完成兼容性处理。 21 | 22 | 请注意,默认的数据库 URL 是: 23 | `postgresql://postgres:postgres@localhost:5432/starhub_portal?sslmode=disable` 24 | 这可能与您的 Rails 服务器使用的数据库名称不同,因此您可能需要更新该 URL 以便在本地运行。 25 | -------------------------------------------------------------------------------- /docs/migrate_to_gitaly_git_server_cn.md: -------------------------------------------------------------------------------- 1 | # 迁移到 Gitaly 2 | 3 | ## 概述 4 | 5 | 在 Release v0.9.0 中,我们将原有的 Git server 从 `Gitea` 迁移到了 `Gitaly`。`Gitaly` 是 `GitLab` 的一个组件,它将 Git 操作从 `GitLab` 应用程序中移出,并运行在单独的服务器上。作为一个 gRPC 服务,`Gitaly` 将 Git 操作委托给 Git 存储库。`Gitaly` 支持在多个服务器上运行,从而实现高可用性和良好的可扩展性。此文档将帮助您将服务从 `Gitea` 版本迁移到 `Gitaly` 版本。 6 | 7 | ## 迁移指引 8 | 9 | ### 1. 准备工作 10 | 11 | 在开始迁移之前,需要确保以下几点: 12 | 13 | 1. Gitea 版服务的仓库存储目录已经挂载在了磁盘上,并且能够被访问。 14 | 2. CSGHub 服务已经不再接受任何请求,避免数据迁移中出现数据丢失。 15 | 16 | ### 2. 迁移步骤 17 | 18 | 1. 获取 Gitea 版服务的仓库存储目录,例如:`/data/gitdata/git/repositories`。 19 | 2. 将该目录配置到 gitaly 配置文件中,在 gitaly 配置文件中找到 `[[storage]]` 项,配置 `path` 值为第 1 步中的目录。 20 | 3. 启动 CSGHub 所有服务,进入 csghub-server 容器,执行`./starhub git generate-lfs-meta-objects`。 21 | 22 | ### 3. 验证迁移结果 23 | 24 | 登录新版服务,查看仓库是否已成功迁移,以及其中的文件是否完整。 25 | -------------------------------------------------------------------------------- /docs/user_system_cn.md: -------------------------------------------------------------------------------- 1 | # 用户系统概述 2 | CSGHub 平台通过对接 Casdoor 实现了用户的登录授权,Casdoor 自身具备单点登录和第三方登录的能力,用户可以方便的进行配置和集成。 3 | 4 | ## 集成方式 5 | 在 csghub-server 的 user service 可以通过如下环境变量的配置进行 Casdoor 的接入: 6 | - STARHUB_SERVER_CASDOOR_CLIENT_ID: ${STARHUB_SERVER_CASDOOR_CLIENT_ID} 7 | - STARHUB_SERVER_CASDOOR_CLIENT_SECRET: ${STARHUB_SERVER_CASDOOR_CLIENT_SECRET} 8 | - STARHUB_SERVER_CASDOOR_ENDPOINT: ${STARHUB_SERVER_CASDOOR_ENDPOINT} 9 | - STARHUB_SERVER_CASDOOR_CERTIFICATE: 10 | - STARHUB_SERVER_CASDOOR_ORGANIZATION_NAME: ${STARHUB_SERVER_CASDOOR_ORGANIZATION_NAME} 11 | - STARHUB_SERVER_CASDOOR_APPLICATION_NAME: ${STARHUB_SERVER_CASDOOR_APPLICATION_NAME} 12 | 13 | ## 特别注意 14 | 1. 第三方登录的用户,因为各个集成的第三方系统的差异(可能会没有用户名,或者用户名为中文等情况),这些差异跟我们自身系统不兼容 15 | 所以对于第三方登录的用户,我们强制要求用户对用户名进行更新,且只能更新一次 16 | 2. 目前 csghub-server 还未完成 casdoor 密码回写的集成,所以系统暂不支持更新用户密码 17 | -------------------------------------------------------------------------------- /frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /frontend/.tool-versions: -------------------------------------------------------------------------------- 1 | nodejs 22.10.0 2 | -------------------------------------------------------------------------------- /frontend/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["Vue.volar"] 3 | } 4 | -------------------------------------------------------------------------------- /frontend/embed.go: -------------------------------------------------------------------------------- 1 | package frontend 2 | 3 | import "embed" 4 | 5 | //go:embed dist 6 | var Dist embed.FS 7 | -------------------------------------------------------------------------------- /frontend/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": "./", 4 | "paths": { 5 | "@/*": ["src/*"] 6 | } 7 | }, 8 | "exclude": ["node_modules", "dist"] 9 | } 10 | 11 | -------------------------------------------------------------------------------- /frontend/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /frontend/public/images/collection_half_cirle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/public/images/collection_half_cirle.png -------------------------------------------------------------------------------- /frontend/public/images/default_cover_image copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/public/images/default_cover_image copy.png -------------------------------------------------------------------------------- /frontend/public/images/default_cover_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/public/images/default_cover_image.png -------------------------------------------------------------------------------- /frontend/public/images/default_org.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/public/images/default_org.png -------------------------------------------------------------------------------- /frontend/public/images/empty-models.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/public/images/empty-models.png -------------------------------------------------------------------------------- /frontend/public/images/error_page_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/public/images/error_page_bg.png -------------------------------------------------------------------------------- /frontend/public/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/public/images/favicon.ico -------------------------------------------------------------------------------- /frontend/public/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/public/images/favicon.png -------------------------------------------------------------------------------- /frontend/public/images/files/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/public/images/files/Default.png -------------------------------------------------------------------------------- /frontend/public/images/icons/Finished.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/icons/Processing.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /frontend/public/images/icons/admin-menu-active-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/admin-menu-cloud.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/icons/admin-menu-dashboard.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/public/images/icons/admin-menu-settings.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/icons/admin-menu-to-left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/icons/admin-menu-users.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/icons/alert.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/arrow.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/public/images/icons/branch.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /frontend/public/images/icons/broadcast-close-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /frontend/public/images/icons/broadcast-close-light.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/check_circle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/chevron-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/icons/chevron-up.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/icons/chevron_right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/clock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /frontend/public/images/icons/close_menu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/icons/commits.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /frontend/public/images/icons/create_org_repo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/public/images/icons/dataflow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/dataflow_alignL.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/icons/dataflow_alignR.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/icons/dataflow_backIcon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/icons/dataflow_drag.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/icons/dataflow_homeIcon_divider.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/icons/dataflow_menuIcon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/icons/dataflow_menuIcon_tlp.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /frontend/public/images/icons/dataflow_menuline.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/icons/datasets.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /frontend/public/images/icons/dot_black.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/icons/download.svg: -------------------------------------------------------------------------------- 1 | 8 | 14 | -------------------------------------------------------------------------------- /frontend/public/images/icons/download2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/icons/download_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/icons/edit.svg: -------------------------------------------------------------------------------- 1 | 8 | 14 | 15 | -------------------------------------------------------------------------------- /frontend/public/images/icons/edit_org_member_role.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/el_upload.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /frontend/public/images/icons/evaluation_new.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /frontend/public/images/icons/exclamation_point.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/icons/extraction.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/icons/file.svg: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /frontend/public/images/icons/finetune_cpu_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/icons/finetune_tip.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /frontend/public/images/icons/fullscreen.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/icons/input_tip.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/public/images/icons/instance_deploy_failed_tips.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /frontend/public/images/icons/instance_logs.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /frontend/public/images/icons/invite_org_member.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /frontend/public/images/icons/json.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/icons/language_tag.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /frontend/public/images/icons/lock-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/icons/login_failed.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/mcp_item_download.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/icons/mcp_item_hybrid.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /frontend/public/images/icons/mcp_item_typescript.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/icons/menu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/icons/metadata_GGUF.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/icons/model_finetune_create.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/icons/more_menu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/icons/navbar-collection.svg: -------------------------------------------------------------------------------- 1 | 9 | 18 | -------------------------------------------------------------------------------- /frontend/public/images/icons/navbar-language.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/navbar-logout.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/navbar-new.svg: -------------------------------------------------------------------------------- 1 | 9 | 16 | -------------------------------------------------------------------------------- /frontend/public/images/icons/navbar-neworganization.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/navbar-profile.svg: -------------------------------------------------------------------------------- 1 | 2 | 9 | -------------------------------------------------------------------------------- /frontend/public/images/icons/new_dot.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/parquet_api.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/icons/parquet_auto_converted.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/icons/playground_api.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/icons/plus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/prompt_card_settgins.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/icons/prompting_navbar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/prompts_Code.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/prompts_DataAnalysis.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/prompts_Design.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /frontend/public/images/icons/prompts_Education.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/prompts_Music.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/prompts_history.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/prompts_layout_left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/prompts_pipe.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/prompts_reAnswer.svg: -------------------------------------------------------------------------------- 1 | 8 | 14 | -------------------------------------------------------------------------------- /frontend/public/images/icons/prompts_source.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /frontend/public/images/icons/refresh.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/repoheader_dataset.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | -------------------------------------------------------------------------------- /frontend/public/images/icons/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/space_endpoint.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/icons/space_nginx.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/public/images/icons/space_static.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /frontend/public/images/icons/space_upload.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /frontend/public/images/icons/sync-diff.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/sync-remote.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/sync.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/icons/top_right_arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/icons/trash.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/twitter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/icons/useIcon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/icons/vertical_divider.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /frontend/public/images/icons/vertical_divider2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/icons/x-close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/invite_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/public/images/invite_bg.png -------------------------------------------------------------------------------- /frontend/public/images/new_organization_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/public/images/new_organization_bg.png -------------------------------------------------------------------------------- /frontend/public/images/opencsg_avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/public/images/opencsg_avatar.png -------------------------------------------------------------------------------- /frontend/public/images/opencsg_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/public/images/opencsg_logo.png -------------------------------------------------------------------------------- /frontend/public/images/search_circle_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/public/images/search_circle_bg.png -------------------------------------------------------------------------------- /frontend/public/images/tags/action-detection.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/tags/audio-classification.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/tags/auto-speech-recognition.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /frontend/public/images/tags/face-detection.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/tags/face-image-generation.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/tags/face-recognition.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/tags/feature-extraction.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/tags/image-classification.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/tags/image-super-resolution.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/tags/keyword-spotting.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/tags/nli.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/tags/ocr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/tags/protein-structure.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/tags/relation-extraction.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/tags/sentence-similarity.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /frontend/public/images/tags/sentiment-classification.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/tags/skin-retouching.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/tags/speech-signal-process.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /frontend/public/images/tags/table-question-answering.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/tags/text-to-speech.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/tags/token-classification.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/tags/translation.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/tags/voice-activity-detection.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/src/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/src/assets/images/.keep -------------------------------------------------------------------------------- /frontend/src/assets/images/default_cover_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/src/assets/images/default_cover_image.png -------------------------------------------------------------------------------- /frontend/src/assets/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/src/assets/images/favicon.png -------------------------------------------------------------------------------- /frontend/src/assets/images/new_organization_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/src/assets/images/new_organization_bg.png -------------------------------------------------------------------------------- /frontend/src/assets/images/opencsg_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/src/assets/images/opencsg_logo.png -------------------------------------------------------------------------------- /frontend/src/assets/stylesheets/element-plus/application.css: -------------------------------------------------------------------------------- 1 | @import "_variables.css"; 2 | @import "input.css"; 3 | @import "menu.css"; 4 | @import "upload.css"; 5 | @import "button.css"; -------------------------------------------------------------------------------- /frontend/src/assets/stylesheets/element-plus/index.css: -------------------------------------------------------------------------------- 1 | /* Element Plus 组件样式统一导入 */ 2 | 3 | /* MessageBox 组件样式 */ 4 | @import './el-message-box.css'; 5 | 6 | /* 在这里可以继续导入其他组件样式 */ 7 | /* 例如: 8 | @import './el-button.css'; 9 | @import './el-input.css'; 10 | @import './el-select.css'; 11 | 等等 12 | */ -------------------------------------------------------------------------------- /frontend/src/assets/stylesheets/element-plus/upload.css: -------------------------------------------------------------------------------- 1 | .hide .el-upload.el-upload--picture-card { 2 | display: none; 3 | } -------------------------------------------------------------------------------- /frontend/src/assets/vue.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/src/components/admin_next/admin_component/Navbar/Navbar.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | 16 | -------------------------------------------------------------------------------- /frontend/src/components/admin_next/admin_component/Pagination/NextButton.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 20 | -------------------------------------------------------------------------------- /frontend/src/components/admin_next/admin_component/Pagination/Pagination.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | 14 | 34 | -------------------------------------------------------------------------------- /frontend/src/components/admin_next/admin_component/Pagination/PrevButton.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 20 | -------------------------------------------------------------------------------- /frontend/src/components/admin_next/admin_component/index.js: -------------------------------------------------------------------------------- 1 | // manage all admin common components 2 | 3 | import Container from './Container.vue' 4 | import Menu from './Menu.vue' 5 | import Pagination from './Pagination/Pagination.vue' 6 | import Table from './Table/Table.vue' 7 | import Navbar from './Navbar/Navbar.vue' 8 | import Card from './Card/Card.vue' 9 | 10 | export { Container, Menu, Pagination, Table, Navbar, Card } 11 | -------------------------------------------------------------------------------- /frontend/src/components/admin_next/dashboard/AdminDashboard.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 14 | -------------------------------------------------------------------------------- /frontend/src/components/application_spaces/AppPayMode.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 31 | -------------------------------------------------------------------------------- /frontend/src/components/application_spaces/BuildStatus.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /frontend/src/components/application_spaces/ErrorStatus.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /frontend/src/components/application_spaces/SpaceRelationsCard.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | -------------------------------------------------------------------------------- /frontend/src/components/application_spaces/SuccessStatus.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /frontend/src/components/application_spaces/WarningStatus.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /frontend/src/components/codes/CodeRelationsCard.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | -------------------------------------------------------------------------------- /frontend/src/components/datasets/DatasetRelationsCard.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 28 | -------------------------------------------------------------------------------- /frontend/src/components/form/sub/FormLabel.vue: -------------------------------------------------------------------------------- 1 | 11 | 24 | -------------------------------------------------------------------------------- /frontend/src/components/images/BackgroundPattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/src/components/images/BackgroundPattern.png -------------------------------------------------------------------------------- /frontend/src/components/images/opencsg_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/frontend/src/components/images/opencsg_logo.png -------------------------------------------------------------------------------- /frontend/src/components/mcp/ToolNameCell.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 24 | -------------------------------------------------------------------------------- /frontend/src/components/models/EmptyModels.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/src/components/models/ModelRelationsCard.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | -------------------------------------------------------------------------------- /frontend/src/components/navbar/menuItem/Mcp.vue: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /frontend/src/components/navbar/menuItem/McpTools.vue: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /frontend/src/components/new_admin/AdminDashboard.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 14 | -------------------------------------------------------------------------------- /frontend/src/components/new_admin/AdminNavbar.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /frontend/src/components/prompts/PromptsHub.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 33 | -------------------------------------------------------------------------------- /frontend/src/components/prompts/PromptsTags.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 34 | -------------------------------------------------------------------------------- /frontend/src/components/shared/DeployDropdown.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 31 | -------------------------------------------------------------------------------- /frontend/src/components/shared/FlashMessage.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /frontend/src/components/shared/InstanceInBuilding.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 17 | 18 | -------------------------------------------------------------------------------- /frontend/src/components/shared/MoreTags.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 22 | -------------------------------------------------------------------------------- /frontend/src/components/shared/NewTag.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /frontend/src/components/shared/Next.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /frontend/src/components/shared/Previous.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /frontend/src/components/shared/RepoFiles.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 32 | -------------------------------------------------------------------------------- /frontend/src/components/shared/SvgIcon.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 32 | 33 | 38 | -------------------------------------------------------------------------------- /frontend/src/components/shared/inputs/InputTip.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | -------------------------------------------------------------------------------- /frontend/src/components/shared/viewers/TextViewer.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /frontend/src/components/user_settings/ProfileSettings.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 20 | -------------------------------------------------------------------------------- /frontend/src/locales/en_js/billing.js: -------------------------------------------------------------------------------- 1 | export const billing = { 2 | title: 'Billing', 3 | balance: 'Account Balance', 4 | inference: 'Inference Instances', 5 | instanceID: 'Instance ID', 6 | createTime: 'Creation Time', 7 | usageTime: 'Total Duration(m)', 8 | cost: 'Cost(yuan)', 9 | status: 'Status', 10 | details: 'Details', 11 | total: 'Total', 12 | refresh: 'Refresh', 13 | instanceBilling: 'Instance Billing', 14 | billing: 'Billing' 15 | } 16 | -------------------------------------------------------------------------------- /frontend/src/locales/en_js/comment.js: -------------------------------------------------------------------------------- 1 | export const comment = { 2 | sureDel: "Confirm to delete this comment.js?", 3 | createComment: "Add a comment.js", 4 | } -------------------------------------------------------------------------------- /frontend/src/locales/en_js/components.js: -------------------------------------------------------------------------------- 1 | export const components = { 2 | upload: { 3 | click_to_upload: "Click to upload", 4 | or_drag_file: "or drag and drop files here", 5 | upload_type: "Support {accept} type file upload", 6 | } 7 | } -------------------------------------------------------------------------------- /frontend/src/locales/en_js/error.js: -------------------------------------------------------------------------------- 1 | export const errors_page = { 2 | not_found: { 3 | title: 'Page not found', 4 | desc: 'Sorry, OpenCSG could not find this web page. This web page may have been removed due to a product update, or your URL is incorrect.', 5 | back: 'Back', 6 | home: 'To homepage', 7 | }, 8 | unauthorized: { 9 | title: 'Unauthorized', 10 | desc: 'Please contact the administrator for authorization', 11 | }, 12 | login_failed: { 13 | title: 'Login failed', 14 | default_msg: 'Unknown login error, please contact the administrator', 15 | back_to_homepage: 'To homepage', 16 | relogin: 'Relogin', 17 | }, 18 | serverError: { 19 | title: 'Server Error {errorCode}' 20 | } 21 | } -------------------------------------------------------------------------------- /frontend/src/locales/en_js/languages.js: -------------------------------------------------------------------------------- 1 | export const languages = { 2 | Chinese: 'Chinese', 3 | English: 'English', 4 | French: 'French', 5 | German: 'German', 6 | Italian: 'Italian', 7 | Japanese: 'Japanese', 8 | Korean: 'Korean', 9 | Spanish: 'Spanish', 10 | Portuguese: 'Portuguese', 11 | Russian: 'Russian', 12 | Arabic: 'Arabic', 13 | ChineseTraditional: 'ChineseTraditional', 14 | ChineseSimplified: 'ChineseSimplified', 15 | Hindi: 'Hindi', 16 | Indonesian: 'Indonesian', 17 | Malay: 'Malay', 18 | Vietnamese: 'Vietnamese', 19 | Turkish: 'Turkish', 20 | Dutch: 'Dutch', 21 | Polish: 'Polish', 22 | Swedish: 'Swedish' 23 | } -------------------------------------------------------------------------------- /frontend/src/locales/en_js/repo.js: -------------------------------------------------------------------------------- 1 | export const repo = { 2 | edit: { 3 | fileName: "File Name", 4 | main: "Directly submit to the main branch", 5 | submit: "Submit Update", 6 | desc: "Provide more description", 7 | update: "Update file", 8 | cancel: "Cancel", 9 | }, 10 | source: { 11 | sync: "Sync", 12 | syncing: "Syncing", 13 | syncButton: "Sync Now", 14 | syncDiff: "Sync Diff", 15 | all: "All sources", 16 | opencsg: "OpenCSG", 17 | local: "Local", 18 | remoteResource: "OpenCSG Remote Resource", 19 | syncCompleted: "Local version matches remote source version", 20 | needSync: "Remote has pending sync versions", 21 | from: "Mirror from", 22 | checkSyncDiff: "Check Sync Diff", 23 | added: "Added", 24 | removed: "Removed", 25 | modified: "Modified", 26 | syncDiffError: "Sync Diff Error", 27 | nodiffs: "No diffs from remote", 28 | } 29 | } -------------------------------------------------------------------------------- /frontend/src/locales/en_js/resource_console.js: -------------------------------------------------------------------------------- 1 | export const resourceConsole = { 2 | free: "Free", 3 | minute: "Pay-as-you-go", 4 | yearMonth: "Yearly Subscription", 5 | others:"Others", 6 | title: "Resource Management", 7 | new:'Create', 8 | instance:'Instance' 9 | } -------------------------------------------------------------------------------- /frontend/src/locales/en_js/rule.js: -------------------------------------------------------------------------------- 1 | export const rule = { 2 | notChangable: "Can't be changed once been set", 3 | // nameRule: "A string of 2-64 alphanumeric characters, _.-, where _.- cannot appear side by side, must start with a letter, and end with a letter or number.", 4 | nameRule: "Please enter a combination of 2 to 10 letters and numbers", 5 | collectionNameRule: "A string of 2-70 alphanumeric characters, _.-, where _.- cannot appear side by side, must start with a letter, and end with a letter or number.", 6 | lengthLimit: "The length is within the range of {min} to {max} characters", 7 | startWithLetter: "Must start with a letter", 8 | endWithLetterOrNumber: "Must end with a number or letter", 9 | onlyLetterNumberAndSpecialStr: "Can only contain letters, numbers, and -_.", 10 | specialStrNotTogether: "Special characters cannot appear consecutively", 11 | } -------------------------------------------------------------------------------- /frontend/src/locales/en_js/spaces.js: -------------------------------------------------------------------------------- 1 | export const spaces = { 2 | title: "Application Space", 3 | placeholder: "Search Spaces", 4 | tips:"Creating Interactive Machine Learning Demos", 5 | associated:'Associated Spaces', 6 | sdkPlaceholder:'Select space type', 7 | } -------------------------------------------------------------------------------- /frontend/src/locales/en_js/sshKey.js: -------------------------------------------------------------------------------- 1 | export const sshKey = { 2 | desc: "SSH keys are used to authenticate Git operations over SSH. Add your public SSH key here to connect to your repositories securely.", 3 | addSshKey: "Add SSH Key", 4 | noKeyTips: "There are currently no SSH keys added to your account", 5 | sshKeyName: "SSH Key Name", 6 | sshKeyContent: "SSH Key Content", 7 | nameWarning: "Please enter the SSH Key Name", 8 | contentWarning: "Please enter the SSH Key Content", 9 | sureDelKey: 10 | "Are you sure you want to delete this key from your account? This action cannot be undone.", 11 | delKeyName: "Delete Key {value}", 12 | addedOn: "Added on {year}/{month}/{day}", 13 | addedMinutesAgo: "Added {minutes} minutes ago", 14 | addedHoursAgo: "Added {hours} hours ago", 15 | addedDaysAgo: "Added {days} days ago" 16 | } -------------------------------------------------------------------------------- /frontend/src/locales/en_js/tags.js: -------------------------------------------------------------------------------- 1 | export const tags = { 2 | computer_vision: "Computer Vision", 3 | natural_language_processing: "Natural Language Processing", 4 | audio_processing: "Audio Processing", 5 | multimodal: "Multimodal", 6 | text_processing: "Text Processing", 7 | graphics: "Graphics", 8 | audio: "Audio", 9 | video: "Video", 10 | } -------------------------------------------------------------------------------- /frontend/src/locales/en_js/user_sessions.js: -------------------------------------------------------------------------------- 1 | export const user_sessions = { 2 | expiredTitle: 'Sign Status Invalid', 3 | expiredDesc: 'Login has expired. Click "Sign Back In" to log in again', 4 | reLogin: 'Sign Back In', 5 | cancelLogin: 'Cancel Login', 6 | } 7 | 8 | -------------------------------------------------------------------------------- /frontend/src/locales/en_js/widgets.js: -------------------------------------------------------------------------------- 1 | export const widgets = { 2 | onlineDemo: "Online Experience", 3 | testInput: "Test Input", 4 | testOutput: "Test Result", 5 | wordsNumber: "Word Count", 6 | runTest: "Run Test", 7 | timeCost: "More inference time", 8 | liabilityExemption: "The results are generated by artificial intelligence models and do not represent the views, positions or attitudes of the platform. Please use the generated content in a reasonable and friendly manner" 9 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_hant_js/accessToken.js: -------------------------------------------------------------------------------- 1 | export const accessToken = { 2 | title: "使用者 Access Token", 3 | desc: "Access Tokens 主要用於驗證您的身分,允許應用程式基於 Token 權限執行操作。請不要與任何人分享您的存取權杖。", 4 | refresh: "重新整理 Access Token", 5 | refreshWarning: "重新整理之後現有的 Access Token 將會失效,確認繼續嗎?", 6 | confirm: "繼續重新整理", 7 | cancelInfo: "操作已取消", 8 | 9 | starshipTitle: "Starship API Keys", 10 | starshipDesc: "Starship API Key 用於授權您對 Starship 服務的存取", 11 | starshipRefresh: "重新整理", 12 | starshipAddToken: "新增 API Key", 13 | starshipAccessTokenName: "Starship API Key Name", 14 | starshipAccessTokenValue: "Starship API Key Value", 15 | starshipNameMissing: "API Key 名稱缺失", 16 | 17 | syncTitle: "多源同步 Token", 18 | syncDesc: "多源同步 Token 用於授權您對多源同步服務的存取", 19 | syncRefresh: "重新整理 Token", 20 | syncRefreshWarning: "重新整理後現有的 Token 將會失效,確認繼續嗎?", 21 | syncAddToken: "新增 Token" 22 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_hant_js/billing.js: -------------------------------------------------------------------------------- 1 | export const billing = { 2 | title: '費用帳單', 3 | balance: '帳戶額度', 4 | available_balance: '當前帳戶下可用餘額', 5 | inference: '推理實例', 6 | btn_recharge: '帳戶儲值', 7 | finetune: '微調實例', 8 | instanceName: '實例名稱', 9 | instanceID: '實例id', 10 | createTime: '創建時間', 11 | tokenNum: 'Token數量', 12 | usageTime: '總時長(分)', 13 | cost: '費用(元)', 14 | status: '狀態', 15 | details: '明細', 16 | btn_details: '儲值明細', 17 | total: '總計', 18 | refresh: '刷新', 19 | instanceBilling: '實例計費', 20 | billing: '計費', 21 | Running: '使用中', 22 | Stopped: '已暫停', 23 | cycle:'帳單週期', 24 | to:'至' 25 | } 26 | -------------------------------------------------------------------------------- /frontend/src/locales/zh_hant_js/blog.js: -------------------------------------------------------------------------------- 1 | export const blogs = { 2 | subtitle: "官方部落格", 3 | title: "資源與洞察", 4 | desc: "最新行業資訊、訪談、技術動態與資源。", 5 | searchPlaceholder: "搜尋", 6 | author: "文章作者", 7 | all: "查看全部文章", 8 | latest: "最新文章", 9 | toc: "目錄", 10 | category: "文章分類", 11 | categories: { 12 | all: "全部", 13 | product: "產品", 14 | news: "發布", 15 | development: "開發", 16 | guide: "指南", 17 | company: "公司", 18 | case: "案例", 19 | community: "社群", 20 | } 21 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_hant_js/campaign.js: -------------------------------------------------------------------------------- 1 | export const campaign = { 2 | Organizer: '舉辦方', 3 | More: '了解更多', 4 | SignUp: '立即報名', 5 | Time: '活動時間', 6 | Site: '活動地點', 7 | prestart: '即將開始', 8 | signing_up: '報名中', 9 | in_progress: '正在進行', 10 | ended: '已結束', 11 | toList:'查看所有活動', 12 | csghub:'傳神社區', 13 | hotItem:'熱門活動', 14 | hotDec:'關注更多國內外領先的產業技術大會以及傳神社區精彩活動', 15 | linkSpace:'關聯應用空間', 16 | subSuccess:'表單提交成功!', 17 | subInfo:'感謝您對OpenCSG的大力支持,我們將會盡快聯繫到您', 18 | backToIndex:'返回主頁', 19 | formTip1:'同意傳神社區的', 20 | formTip2:'隱私政策、服務條款', 21 | checkError:'請閱讀並同意傳神社區的隱私政策、服務條款.', 22 | formTitDec:'感謝您對傳神開放社區的支持', 23 | all:'全部活動', 24 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_hant_js/comment.js: -------------------------------------------------------------------------------- 1 | export const comment = { 2 | sureDel: "確認刪除此評論?", 3 | createComment: "添加評論", 4 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_hant_js/components.js: -------------------------------------------------------------------------------- 1 | export const components = { 2 | upload: { 3 | click_to_upload: "點擊上傳", 4 | or_drag_file: "或拖曳檔案到這裡", 5 | upload_type: "支持 {accept} 類型檔案上傳", 6 | } 7 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_hant_js/error.js: -------------------------------------------------------------------------------- 1 | export const errors_page = { 2 | not_found: { 3 | title: '無法存取網頁', 4 | desc: '抱歉,OpenCSG 找不到該網頁。該網頁或許由於產品更新已被刪除,或者您的網址不正確', 5 | back: '返回', 6 | home: '回到首頁', 7 | }, 8 | unauthorized: { 9 | title: '暫無權限', 10 | desc: '請聯絡管理員授權', 11 | }, 12 | login_failed: { 13 | title: '登入失敗', 14 | default_msg: '未知登入錯誤,請聯絡管理員', 15 | back_to_homepage: '回到首頁', 16 | relogin: '重新登入', 17 | }, 18 | serverError: { 19 | title: '伺服器錯誤 {errorCode}' 20 | } 21 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_hant_js/experts.js: -------------------------------------------------------------------------------- 1 | export const experts = { 2 | community_experts: '社群專家', 3 | index: { 4 | bg_title: '認識 OpenCSG 背後的專家們', 5 | title: 'OpenCSG 邀請您作為專家入駐社群,讓我們共建開源開放、共享開源生態。希望您為使用者提供技術支援及諮詢,解決方案設計指導等。', 6 | apply_button: '成為社群專家', 7 | }, 8 | apply: { 9 | welcome_title: '歡迎加入 OpenCSG 專家社群', 10 | welcome_content_1: 'OpenCSG 邀請您入駐專家社群,讓我們共建開源開放、共享開源生態。', 11 | welcome_content_2: '希望您為使用者提供技術支援及諮詢,解決方案設計指導等。', 12 | welcome_content_3: '您可以是人工智慧專家,軟體開發專家,開源專家,演算法專家,法務專家等。', 13 | welcome_content_4: '誠摯的歡迎您入駐專家社群。', 14 | } 15 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_hant_js/languages.js: -------------------------------------------------------------------------------- 1 | export const languages = { 2 | Chinese: '中文', 3 | English: '英文', 4 | French: '法文', 5 | German: '德文', 6 | Italian: '義大利文', 7 | Japanese: '日文', 8 | Korean: '韓文', 9 | Spanish: '西班牙文', 10 | Portuguese: '葡萄牙文', 11 | Russian: '俄文', 12 | Arabic: '阿拉伯文', 13 | ChineseTraditional: '繁體中文', 14 | ChineseSimplified: '簡體中文', 15 | Hindi: '印地文', 16 | Indonesian: '印尼文', 17 | Malay: '馬來文', 18 | Vietnamese: '越南文', 19 | Turkish: '土耳其文', 20 | Dutch: '荷蘭文', 21 | Polish: '波蘭文', 22 | Swedish: '瑞典文' 23 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_hant_js/repo.js: -------------------------------------------------------------------------------- 1 | export const repo = { 2 | edit: { 3 | fileName: "檔案名稱", 4 | main: "直接提交到 main 分支", 5 | submit: "提交更新", 6 | desc: "提供更多描述", 7 | update: "更新檔案", 8 | cancel: "取消", 9 | }, 10 | source: { 11 | sync: "同步", 12 | syncButton: "立即同步", 13 | syncing: "同步中", 14 | syncDiff: "同步差異", 15 | all: "顯示所有源", 16 | opencsg: "OpenCSG", 17 | local: "本地", 18 | remoteResource: "OpenCSG 遠端資源", 19 | syncCompleted: "本地版本與遠端源版本一致", 20 | needSync: "遠端有待同步版本", 21 | from: "鏡像來自", 22 | checkSyncDiff: "查看同步差異", 23 | added: "新增", 24 | removed: "刪除", 25 | modified: "修改", 26 | syncDiffError: "同步差異獲取失敗", 27 | nodiffs: "遠端沒有更新", 28 | } 29 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_hant_js/resource_console.js: -------------------------------------------------------------------------------- 1 | export const resourceConsole = { 2 | free: "免費", 3 | minute: "按需付費", 4 | yearMonth: "包年包月", 5 | others:"其他", 6 | title: "資源管理", 7 | yearMonthResources:'包年包月資源', 8 | buy:'購買資源', 9 | new:'新建實例', 10 | resourceType:'資源類型', 11 | resourceId:'資源ID', 12 | resource:'配置', 13 | startTime:'啟動時間', 14 | endTime:'到期時間', 15 | price:'價格', 16 | instance:'實例' 17 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_hant_js/rule.js: -------------------------------------------------------------------------------- 1 | export const rule = { 2 | notChangable: "設定後不可變更", 3 | // nameRule: "2-64个字母数字_.-的字符串,_.-不能并列出现,只能字母开头,字母或者数字结尾", 4 | nameRule: "請輸入2~10位的字母、數字組合", 5 | collectionNameRule: "2-70個字母數字_.-的字串,_.-不能並列出現,只能字母開頭,字母或者數字結尾", 6 | lengthLimit: "長度在{min}到{max}字元範圍", 7 | startWithLetter: "必須以字母開頭", 8 | endWithLetterOrNumber: "必須以字母或者數字結尾", 9 | onlyLetterNumberAndSpecialStr: "只能包含字母、數字與特殊字元_.-", 10 | specialStrNotTogether: "特殊字元不能並列出現", 11 | } 12 | -------------------------------------------------------------------------------- /frontend/src/locales/zh_hant_js/shared.js: -------------------------------------------------------------------------------- 1 | export const shared = { 2 | commitToMain: "直接提交到 main 分支", 3 | dragOr: "拖曳檔案到這裡或者", 4 | uploadFile5Mb: "網頁端僅支援5M以內大小檔案上傳,更大檔案請通過Git命令使用LFS上傳", 5 | onlyFiveFiles: "最多支援 5 個檔案", 6 | lfs1: "此檔案儲存在 ", 7 | lfs2: "Git LFS", 8 | lfs3: " 中。它太大了,無法顯示,但您仍然可以", 9 | lfs4: "下載", 10 | lfs5: "它。", 11 | lfs6: "Git LFS 詳細資訊", 12 | lfs7: "指標大小", 13 | lfs8: "檔案大小", 14 | lfs9: "原始指標檔案", 15 | lfs10: "Git大檔案儲存(LFS)將大檔案替換為Git內部的文字指標,同時將檔案內容儲存在遠端伺服器上。", 16 | lfs11: "更多資訊", 17 | preview: "預覽", 18 | edit: "編輯", 19 | likes: "收藏", 20 | hasLikes: "已收藏", 21 | tooLargeFile: "檔案過大無法顯示,您可以查看", 22 | tooLargeFile2: "原始版本", 23 | tooLargeFile3:"" 24 | 25 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_hant_js/spaces.js: -------------------------------------------------------------------------------- 1 | export const spaces = { 2 | title: "應用空間", 3 | placeholder: "應用空間名稱", 4 | tips:"創建可互動的機器學習Demo", 5 | associated:"關聯空間", 6 | sdkPlaceholder:'選擇空間類型' 7 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_hant_js/sshKey.js: -------------------------------------------------------------------------------- 1 | export const sshKey = { 2 | desc: "SSH 金鑰用於通過 SSH 進行 Git 操作的身分驗證。在此新增您的公鑰以安全地連線到您的代碼倉庫。", 3 | addSshKey: "新增 SSH Key", 4 | noKeyTips: "現在還沒有新增SSH key到您的帳戶", 5 | sshKeyName: "SSH Key 名稱", 6 | sshKeyContent: "SSH Key 內容", 7 | nameWarning: "請您填寫SSH Key 名稱", 8 | contentWarning: "請您填寫SSH Key 內容", 9 | sureDelKey: "你確定要從你的帳戶中刪除此金鑰嗎?此操作無法撤銷。", 10 | delKeyName: "刪除 Key {value}", 11 | addedOn: "於 {year}年{month}月{day}日新增", 12 | addedMinutesAgo: "{minutes} 分鐘前新增", 13 | addedHoursAgo: "{hours} 小時前新增", 14 | addedDaysAgo: "{days} 天前新增" 15 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_hant_js/tags.js: -------------------------------------------------------------------------------- 1 | export const tags = { 2 | computer_vision: "計算機視覺", 3 | natural_language_processing: "自然語言處理", 4 | audio_processing: "語音處理", 5 | multimodal: "多模態", 6 | text_processing: "文本處理", 7 | graphics: "圖像", 8 | audio: "音訊", 9 | video: "影片", 10 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_hant_js/user_sessions.js: -------------------------------------------------------------------------------- 1 | export const user_sessions = { 2 | expiredTitle: '登錄狀態失效', 3 | expiredDesc: '登錄已失效,請點擊重新登錄', 4 | reLogin: '重新登錄', 5 | cancelLogin: '登出', 6 | cancel: '取消' 7 | } 8 | 9 | -------------------------------------------------------------------------------- /frontend/src/locales/zh_hant_js/widgets.js: -------------------------------------------------------------------------------- 1 | export const widgets = { 2 | onlineDemo: "線上體驗", 3 | testInput: "測試內容", 4 | testOutput: "測試結果", 5 | wordsNumber: "單詞數", 6 | runTest: "執行測試", 7 | timeCost: "模型推理耗時", 8 | liabilityExemption: "結果由人工智能模型生成,不代表本平台的觀點、立場或態度,請合理友善地使用生成內容" 9 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_js/accessToken.js: -------------------------------------------------------------------------------- 1 | export const accessToken = { 2 | title: "用户 Access Token", 3 | desc: "Access Tokens 主要用于验证您的身份,允许应用程序基于Token权限执行操作。请不要与任何人分享您的访问令牌。", 4 | refresh: "刷新 Access Token", 5 | refreshWarning: "刷新之后现有的 Access Token 将会失效,确认继续吗?", 6 | confirm: "继续刷新", 7 | cancelInfo: "操作已取消", 8 | 9 | starshipTitle: "Starship API Keys", 10 | starshipDesc: "Starship API Key 用于授权您对 Starship 服务的访问", 11 | starshipRefresh: "刷新", 12 | starshipAddToken: "新建 API Key", 13 | starshipAccessTokenName: "Starship API Key Name", 14 | starshipAccessTokenValue: "Starship API Key Value", 15 | starshipNameMissing: "API Key name 缺失", 16 | 17 | syncTitle: "多源同步 Token", 18 | syncDesc: "多源同步 Token 用于授权您对多源同步服务的访问", 19 | syncRefresh: "刷新 Token", 20 | syncRefreshWarning: "刷新后现有的 Token 将会失效,确认继续吗?", 21 | syncAddToken: "新建 Token" 22 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_js/billing.js: -------------------------------------------------------------------------------- 1 | export const billing = { 2 | title: '费用账单', 3 | balance: '账户可用额度', 4 | inference: '推理实例', 5 | instanceID: '实例id', 6 | createTime: '创建时间', 7 | usageTime: '总时长(分)', 8 | cost: '费用(元)', 9 | status: '状态', 10 | details: '明细', 11 | total: '总计', 12 | refresh: '刷新', 13 | instanceBilling: '实例计费', 14 | billing: '计费' 15 | } 16 | -------------------------------------------------------------------------------- /frontend/src/locales/zh_js/comment.js: -------------------------------------------------------------------------------- 1 | export const comment = { 2 | sureDel: "确认删除此评论?", 3 | createComment: "添加评论", 4 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_js/components.js: -------------------------------------------------------------------------------- 1 | export const components = { 2 | upload: { 3 | click_to_upload: "点击上传", 4 | or_drag_file: "或拖拽文件到这里", 5 | upload_type: "支持 {accept} 类型文件上传", 6 | } 7 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_js/error.js: -------------------------------------------------------------------------------- 1 | export const errors_page = { 2 | not_found: { 3 | title: '无法访问网页', 4 | desc: '抱歉,OpenCSG找不到该网页。该网页或许由于产品更新已被删除,或者您的网址不正确', 5 | back: '返回', 6 | home: '回到首页', 7 | }, 8 | unauthorized: { 9 | title: '暂无权限', 10 | desc: '请联系管理员授权', 11 | }, 12 | login_failed: { 13 | title: '登录失败', 14 | default_msg: '未知登录错误,请联系管理员', 15 | back_to_homepage: '回到首页', 16 | relogin: '重新登录', 17 | }, 18 | serverError: { 19 | title: '服务器错误 {errorCode}' 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /frontend/src/locales/zh_js/languages.js: -------------------------------------------------------------------------------- 1 | export const languages = { 2 | Chinese: '中文', 3 | English: '英文', 4 | French: '法文', 5 | German: '德文', 6 | Italian: '意大利文', 7 | Japanese: '日文', 8 | Korean: '韩文', 9 | Spanish: '西班牙文', 10 | Portuguese: '葡萄牙文', 11 | Russian: '俄文', 12 | Arabic: '阿拉伯文', 13 | ChineseTraditional: '繁体中文', 14 | ChineseSimplified: '简体中文', 15 | Hindi: '印地文', 16 | Indonesian: '印尼文', 17 | Malay: '马来文', 18 | Vietnamese: '越南文', 19 | Turkish: '土耳其文', 20 | Dutch: '荷兰文', 21 | Polish: '波兰文', 22 | Swedish: '瑞典文' 23 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_js/navbar.js: -------------------------------------------------------------------------------- 1 | export const navbar = { 2 | console:'资源控制台', 3 | adminPanel: '管理员后台', 4 | models: "模型", 5 | datasets: "数据集", 6 | spaces: "应用", 7 | codes: "代码", 8 | profile: "个人信息", 9 | mcp: "MCP", 10 | mcpText: "MCP 服务器", 11 | mcpTools: "MCP 工具", 12 | mcpToolsText: "LLM 可以执行的动作", 13 | editProfile: "账号设置", 14 | newModel: "新建模型", 15 | newDataset: "新建数据集", 16 | newCode: "新建代码仓库", 17 | newApplicationSpace: "新建应用空间", 18 | newMcpServer: "新建 MCP", 19 | newOrganization: "新建组织", 20 | logout: "退出登录", 21 | register: "注册", 22 | loginRegister: "登录/注册", 23 | login: "登录", 24 | newCollection: "新建合集", 25 | emailMissing: '体验完整功能,请提供您的电子邮件', 26 | usernameNeedChange: '体验完整功能,请先更新您的用户名', 27 | emailAndUsernameMissing: '体验完整功能,请先更新您的用户名和邮箱', 28 | profileEdit: "编辑用户信息", 29 | more: "更多", 30 | setting: "账号设置", 31 | dataflowText: '开启数据集Agentic新范式', 32 | datapipelines: '数据工具', 33 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_js/repo.js: -------------------------------------------------------------------------------- 1 | export const repo = { 2 | edit: { 3 | fileName: "文件名", 4 | main: "直接提交到 main 分支", 5 | submit: "提交更新", 6 | desc: "提供更多描述", 7 | update: "更新文件", 8 | cancel: "取消", 9 | }, 10 | source: { 11 | sync: "同步", 12 | syncButton: "立即同步", 13 | syncing: "同步中", 14 | syncDiff: "同步差异", 15 | all: "显示所有源", 16 | opencsg: "OpenCSG", 17 | local: "本地", 18 | remoteResource: "OpenCSG 远端资源", 19 | syncCompleted: "本地版本与远端源版本一致", 20 | needSync: "远端有待同步版本", 21 | from: "镜像来自", 22 | checkSyncDiff: "查看同步差异", 23 | added: "新增", 24 | removed: "删除", 25 | modified: "修改", 26 | syncDiffError: "同步差异获取失败", 27 | nodiffs: "远端没有更新", 28 | } 29 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_js/resource_console.js: -------------------------------------------------------------------------------- 1 | export const resourceConsole = { 2 | free: "免费", 3 | minute: "按需付费", 4 | yearMonth: "包年包月", 5 | others:"其他", 6 | title: "资源管理", 7 | new:'新建实例', 8 | instance:'实例' 9 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_js/rule.js: -------------------------------------------------------------------------------- 1 | export const rule = { 2 | notChangable: "设置后不可更改", 3 | // nameRule: "2-64个字母数字_.-的字符串,_.-不能并列出现,只能字母开头,字母或者数字结尾", 4 | nameRule: "请输入2~10位的字母、数字组合", 5 | collectionNameRule: "2-70个字母数字_.-的字符串,_.-不能并列出现,只能字母开头,字母或者数字结尾", 6 | lengthLimit: "长度在{min}到{max}字符范围", 7 | startWithLetter: "必须以字母开头", 8 | endWithLetterOrNumber: "必须以字母或者数字结尾", 9 | onlyLetterNumberAndSpecialStr: "只能包含字母、数字与特殊字符_.-", 10 | specialStrNotTogether: "特殊字符不能并列出现", 11 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_js/shared.js: -------------------------------------------------------------------------------- 1 | export const shared = { 2 | commitToMain: "直接提交到 main 分支", 3 | dragOr: "拖拽文件到这里或者", 4 | uploadFile5Mb: "网页端仅支持5M以内大小文件上传,更大文件请通过Git命令使用LFS上传", 5 | onlyFiveFiles: "支持最多 5 个文件", 6 | lfs1: "此文件存储在 ", 7 | lfs2: "Git LFS", 8 | lfs3: " 中。它太大了,无法显示,但您仍然可以", 9 | lfs4: "下载", 10 | lfs5: "它。", 11 | lfs6: "Git LFS 详细信息", 12 | lfs7: "指针大小", 13 | lfs8: "文件大小", 14 | lfs9: "原始指针文件", 15 | lfs10: "Git大文件存储(LFS)将大文件替换为Git内部的文本指针,同时将文件内容存储在远程服务器上。", 16 | lfs11: "更多信息", 17 | preview: "预览", 18 | edit: "编辑", 19 | likes: "收藏", 20 | hasLikes: "已收藏", 21 | tooLargeFile: "文件过大无法显示,您可以查看", 22 | tooLargeFile2: "原始版本", 23 | tooLargeFile3:"" 24 | 25 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_js/spaces.js: -------------------------------------------------------------------------------- 1 | export const spaces = { 2 | title: "应用空间", 3 | placeholder: "应用空间名字", 4 | tips:"创建可交互的机器学习Demo", 5 | associated:"关联空间", 6 | sdkPlaceholder:'选择空间类型' 7 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_js/sshKey.js: -------------------------------------------------------------------------------- 1 | export const sshKey = { 2 | desc: "SSH 密钥用于通过 SSH 进行 Git 操作的身份验证。在此添加您的公钥以安全地连接到您的代码仓库。", 3 | addSshKey: "添加 SSH Key", 4 | noKeyTips: "现在还没有添加SSH key到您的账户", 5 | sshKeyName: "SSH Key 名称", 6 | sshKeyContent: "SSH Key 内容", 7 | nameWarning: "请您填写SSH Key 名称", 8 | contentWarning: "请您填写SSH Key 内容", 9 | sureDelKey: "你确定要从你的帐户中删除此密钥吗?此操作无法撤消。", 10 | delKeyName: "删除 Key {value}", 11 | addedOn: "于 {year}年{month}月{day}日添加", 12 | addedMinutesAgo: "{minutes} 分钟前添加", 13 | addedHoursAgo: "{hours} 小时前添加", 14 | addedDaysAgo: "{days} 天前添加" 15 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_js/tags.js: -------------------------------------------------------------------------------- 1 | export const tags = { 2 | computer_vision: "计算机视觉", 3 | natural_language_processing: "自然语言处理", 4 | audio_processing: "语音处理", 5 | multimodal: "多模态", 6 | text_processing: "文本处理", 7 | graphics: "图像", 8 | audio: "音频", 9 | video: "视频", 10 | } -------------------------------------------------------------------------------- /frontend/src/locales/zh_js/user_sessions.js: -------------------------------------------------------------------------------- 1 | export const user_sessions = { 2 | expiredTitle: '登录状态失效', 3 | expiredDesc: '登录已失效,请点击重新登录', 4 | reLogin: '重新登录', 5 | cancelLogin: '退出登录' 6 | } 7 | 8 | -------------------------------------------------------------------------------- /frontend/src/locales/zh_js/widgets.js: -------------------------------------------------------------------------------- 1 | export const widgets = { 2 | onlineDemo: "在线体验", 3 | testInput: "测试内容", 4 | testOutput: "测试结果", 5 | wordsNumber: "单词数", 6 | runTest: "执行测试", 7 | timeCost: "模型推理耗时", 8 | liabilityExemption: "结果由人工智能模型生成,不代表本平台的观点、立场或态度,请合理友善地使用生成内容" 9 | } -------------------------------------------------------------------------------- /frontend/src/packs/clipboard.js: -------------------------------------------------------------------------------- 1 | import { ElMessage } from 'element-plus' 2 | import { useCookies } from "vue3-cookies" 3 | 4 | export const copyToClipboard = async (textToCopy) => { 5 | const { cookies } = useCookies() 6 | 7 | try { 8 | if (navigator.clipboard && window.isSecureContext) { 9 | await navigator.clipboard.writeText(textToCopy) 10 | } else { 11 | const textArea = document.createElement("textarea") 12 | textArea.value = textToCopy 13 | textArea.style.position = "absolute" 14 | textArea.style.left = "-999999px" 15 | document.body.prepend(textArea) 16 | textArea.select() 17 | document.execCommand('copy') 18 | textArea.remove() 19 | } 20 | ElMessage({ 21 | message: cookies.get('locale') === 'en' ? 'Copied!' : '复制成功!', 22 | type: 'success' 23 | }) 24 | } catch (error) { 25 | console.error(error) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /frontend/src/packs/csrfFetch.js: -------------------------------------------------------------------------------- 1 | const csrfFetch = (url, options={}) => { 2 | return fetch(url, options) 3 | }; 4 | 5 | export default csrfFetch; 6 | -------------------------------------------------------------------------------- /frontend/src/packs/jwtFetch.js: -------------------------------------------------------------------------------- 1 | import { useCookies } from "vue3-cookies"; 2 | const { cookies } = useCookies(); 3 | 4 | const jwtFetch = (url, options = {}, forceLogin = false) => { 5 | const jwtToken = cookies.get('user_token') 6 | if (forceLogin && !jwtToken) { 7 | window.location.href = "/login" 8 | } 9 | options.headers = options.headers || {} 10 | if (jwtToken) { 11 | options.headers = { "Authorization": `Bearer ${jwtToken}`, ...options.headers }; 12 | } 13 | return fetch(url, options) 14 | }; 15 | 16 | export default jwtFetch; -------------------------------------------------------------------------------- /frontend/src/packs/persistPinia.js: -------------------------------------------------------------------------------- 1 | export const customPersistPlugin = (context) => { 2 | if (!context.options.persist) return 3 | 4 | const expirationTime = 2 * 60 * 1000 5 | const savedState = JSON.parse(localStorage.getItem(context.options.persist.key) || '{}') 6 | 7 | if (savedState.timestamp && ((Date.now() - savedState.timestamp) <= expirationTime)) { 8 | context.store.$patch(savedState) 9 | } else { 10 | localStorage.removeItem(context.options.persist.key) 11 | } 12 | 13 | context.store.$subscribe((_, state) => { 14 | const dataToSave = { 15 | ...state, 16 | timestamp: Date.now() 17 | } 18 | localStorage.setItem(context.options.persist.key, JSON.stringify(dataToSave)) 19 | }) 20 | } -------------------------------------------------------------------------------- /frontend/src/stores/RepoTabStore.js: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { reactive } from 'vue' 3 | 4 | const persistKey = 'repo-tab' 5 | 6 | export const useRepoTabStore = defineStore('repoTab', () => { 7 | const repoTab = reactive({ 8 | repoType: '', 9 | namespace: '', 10 | repoName: '', 11 | currentPath: '', 12 | actionName: '', 13 | currentBranch: '', 14 | tab: 'summary', 15 | lastPath: '' 16 | }) 17 | 18 | function setRepoTab(obj) { 19 | Object.assign(repoTab, obj) 20 | } 21 | 22 | const clearStore = () => { 23 | localStorage.removeItem(persistKey) 24 | } 25 | 26 | return { repoTab, setRepoTab, clearStore } 27 | }) -------------------------------------------------------------------------------- /frontend/src/stores/useGlobalStore.js: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia'; 2 | 3 | export const useGlobalStore = defineStore('app', { 4 | state: () => { 5 | return { 6 | isCollapse:false 7 | }; 8 | }, 9 | getters: { 10 | // getCollapse: (state) => state.isCollapse, 11 | }, 12 | actions: { 13 | toggleCollapse() { 14 | this.isCollapse = !this.isCollapse; 15 | }, 16 | setCollapse(value) { 17 | this.isCollapse = value; 18 | } 19 | }, 20 | persist: true, 21 | }); -------------------------------------------------------------------------------- /frontend/src/views/admin/admin_next.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{ .metaTitle }} 7 | 8 | 9 | 10 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /frontend/src/views/admin/index.html: -------------------------------------------------------------------------------- 1 | {{ define "admin_content" }} 2 | 3 | {{ end }} -------------------------------------------------------------------------------- /frontend/src/views/codes/index.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 | 9 | 10 | {{ end }} 11 | -------------------------------------------------------------------------------- /frontend/src/views/codes/new.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 6 |
7 | {{ end }} 8 | 9 | -------------------------------------------------------------------------------- /frontend/src/views/codes/show.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 13 |
14 | {{ end }} -------------------------------------------------------------------------------- /frontend/src/views/collections/index.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 4 |
5 | {{ end }} 6 | -------------------------------------------------------------------------------- /frontend/src/views/collections/new.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 |
4 | 5 | 6 |
7 |
8 | {{ end }} 9 | -------------------------------------------------------------------------------- /frontend/src/views/collections/show.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 7 | 8 |
9 | {{ end }} 10 | -------------------------------------------------------------------------------- /frontend/src/views/datapipelines/index.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 | 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /frontend/src/views/datasets/index.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 | 9 | 10 | {{ end }} 11 | -------------------------------------------------------------------------------- /frontend/src/views/datasets/new.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 6 |
7 | {{ end }} 8 | 9 | -------------------------------------------------------------------------------- /frontend/src/views/datasets/show.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 13 |
14 | {{ end }} -------------------------------------------------------------------------------- /frontend/src/views/endpoints/new.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 4 |
5 | {{ end }} 6 | -------------------------------------------------------------------------------- /frontend/src/views/endpoints/show.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 13 |
14 | {{ end }} 15 | -------------------------------------------------------------------------------- /frontend/src/views/errors/login_failed.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 | 3 | {{ end }} -------------------------------------------------------------------------------- /frontend/src/views/errors/server_error.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 | 3 | {{ end }} -------------------------------------------------------------------------------- /frontend/src/views/evaluations/new.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 4 |
5 | {{ end }} 6 | -------------------------------------------------------------------------------- /frontend/src/views/evaluations/show.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 6 |
7 | {{ end }} 8 | -------------------------------------------------------------------------------- /frontend/src/views/finetunes/new.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 4 |
5 | {{ end }} 6 | -------------------------------------------------------------------------------- /frontend/src/views/finetunes/show.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 11 | 12 |
13 | {{ end }} 14 | -------------------------------------------------------------------------------- /frontend/src/views/home/index.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 | 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /frontend/src/views/layouts/footer.html: -------------------------------------------------------------------------------- 1 | {{ define "layouts/footer.html" }} 2 | 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /frontend/src/views/layouts/navbar.html: -------------------------------------------------------------------------------- 1 | {{ define "layouts/navbar.html" }} 2 |
3 | 4 |
5 | {{ end }} 6 | -------------------------------------------------------------------------------- /frontend/src/views/mcp_servers/deploy.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 8 | 9 |
10 | {{ end }} 11 | -------------------------------------------------------------------------------- /frontend/src/views/mcp_servers/index.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 | 9 | 10 | {{ end }} 11 | -------------------------------------------------------------------------------- /frontend/src/views/mcp_servers/new.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 6 |
7 | {{ end }} 8 | -------------------------------------------------------------------------------- /frontend/src/views/mcp_servers/show.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 13 |
14 | {{ end }} -------------------------------------------------------------------------------- /frontend/src/views/mcp_servers/tools.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 | 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /frontend/src/views/models/index.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 | 9 | 10 | {{ end }} 11 | -------------------------------------------------------------------------------- /frontend/src/views/models/new.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 6 | 7 |
8 | {{ end }} 9 | -------------------------------------------------------------------------------- /frontend/src/views/models/show.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 13 |
14 | {{ end }} 15 | -------------------------------------------------------------------------------- /frontend/src/views/organizations/new.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 4 |
5 | 7 | 8 |
9 |
10 | {{ end }} 11 | -------------------------------------------------------------------------------- /frontend/src/views/organizations/settings.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 7 |
8 | {{ end }} -------------------------------------------------------------------------------- /frontend/src/views/organizations/show.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 6 |
7 | {{ end }} -------------------------------------------------------------------------------- /frontend/src/views/profile/likes.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 |
4 | 6 |
7 |
8 | 12 |
13 |
14 | {{ end }} 15 | 16 | 17 | -------------------------------------------------------------------------------- /frontend/src/views/profile/profile.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 |
4 | 6 |
7 |
8 | 12 | 13 |
14 |
15 | {{ end }} -------------------------------------------------------------------------------- /frontend/src/views/prompts/index.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 9 |
10 | {{ end }} 11 | -------------------------------------------------------------------------------- /frontend/src/views/resource-console/index.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 4 |
5 | {{ end }} 6 | -------------------------------------------------------------------------------- /frontend/src/views/settings/access_token.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 | 3 | {{ end }} -------------------------------------------------------------------------------- /frontend/src/views/settings/profile.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 |

4 | 5 |

6 | 7 |
8 | {{ end }} 9 | -------------------------------------------------------------------------------- /frontend/src/views/settings/ssh_keys.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 7 | 8 |
9 | {{ end }} 10 | -------------------------------------------------------------------------------- /frontend/src/views/settings/starship_access_token.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 6 |
7 | {{ end }} -------------------------------------------------------------------------------- /frontend/src/views/settings/sync_access_token.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 6 |
7 | {{ end }} -------------------------------------------------------------------------------- /frontend/src/views/spaces/index.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 | 5 | 6 | {{ end }} 7 | -------------------------------------------------------------------------------- /frontend/src/views/spaces/new.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 6 | 7 |
8 | {{ end }} 9 | -------------------------------------------------------------------------------- /frontend/src/views/spaces/show.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | 13 |
14 | {{ end }} -------------------------------------------------------------------------------- /frontend/vitest.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vitest/config' 2 | import vue from '@vitejs/plugin-vue' 3 | import path from 'path' 4 | import { fileURLToPath } from 'url' 5 | 6 | const __dirname = path.dirname(fileURLToPath(import.meta.url)) 7 | 8 | export default defineConfig({ 9 | plugins: [vue()], 10 | test: { 11 | setupFiles: ['./setupTests.js'], 12 | environment: 'jsdom', 13 | globals: true, 14 | include: ['src/**/*.{test,spec}.{js,jsx}'], 15 | alias: { 16 | '@': path.resolve(__dirname, './src') 17 | }, 18 | // deps: { 19 | // inline: ['element-plus'], 20 | // }, 21 | server: { 22 | deps: { 23 | inline: ['element-plus', 'vue-i18n', 'pinia'], 24 | } 25 | }, 26 | } 27 | }) -------------------------------------------------------------------------------- /internal/handlers/admin/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/internal/handlers/admin/.keep -------------------------------------------------------------------------------- /internal/handlers/frontend/ping.go: -------------------------------------------------------------------------------- 1 | package frontendHandlers 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/gin-gonic/gin" 7 | ) 8 | 9 | type PingHandler interface { 10 | Ping(c *gin.Context) 11 | } 12 | 13 | type PingHandlerImpl struct{} 14 | 15 | func NewPingHandler() PingHandler { 16 | return &PingHandlerImpl{} 17 | } 18 | 19 | func (i *PingHandlerImpl) Ping(c *gin.Context) { 20 | data := make(map[string]string, 3) 21 | data["message"] = "pong" 22 | data["status"] = "ok" 23 | data["time"] = time.Now().Format(time.DateTime) 24 | 25 | c.JSON(200, data) 26 | } 27 | -------------------------------------------------------------------------------- /internal/handlers/render/codes.go: -------------------------------------------------------------------------------- 1 | package renderHandlers 2 | 3 | type CodeHandler interface { 4 | BaseHandler 5 | } 6 | 7 | type CodeHandlerImpl struct { 8 | BaseHandlerImpl 9 | } 10 | 11 | func NewCodeHandler() CodeHandler { 12 | return &CodeHandlerImpl{ 13 | BaseHandlerImpl{ 14 | resourceType: "codes", 15 | }, 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /internal/handlers/render/datapipelines.go: -------------------------------------------------------------------------------- 1 | package renderHandlers 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | ) 6 | 7 | type DatapipelinesHandler interface { 8 | Index(ctx *gin.Context) 9 | } 10 | 11 | type DatapipelinesHandlerImpl struct { 12 | isSmallFooter bool 13 | } 14 | 15 | func NewDatapipelinesHandler() DatapipelinesHandler { 16 | return &DatapipelinesHandlerImpl{ 17 | isSmallFooter: true, 18 | } 19 | } 20 | 21 | func (i *DatapipelinesHandlerImpl) Index(ctx *gin.Context) { 22 | data := map[string]interface{}{ 23 | "isSmallFooter": i.isSmallFooter, 24 | } 25 | RenderBaseInstance.RenderTemplate(ctx, "datapipelines_index", data) 26 | } 27 | -------------------------------------------------------------------------------- /internal/handlers/render/datasets.go: -------------------------------------------------------------------------------- 1 | package renderHandlers 2 | 3 | type DatasetHandler interface { 4 | BaseHandler 5 | } 6 | 7 | type DatasetHandlerImpl struct { 8 | BaseHandlerImpl 9 | } 10 | 11 | func NewDatasetHandler() DatasetHandler { 12 | return &DatasetHandlerImpl{ 13 | BaseHandlerImpl{ 14 | resourceType: "datasets", 15 | }, 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /internal/handlers/render/endpoint.go: -------------------------------------------------------------------------------- 1 | package renderHandlers 2 | 3 | type EndpointHandler interface { 4 | BaseHandler 5 | } 6 | 7 | type EndpointHandlerImpl struct { 8 | BaseHandlerImpl 9 | } 10 | 11 | func NewEndpointHandler() EndpointHandler { 12 | return &EndpointHandlerImpl{ 13 | BaseHandlerImpl{ 14 | resourceType: "endpoints", 15 | }, 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /internal/handlers/render/evaluation.go: -------------------------------------------------------------------------------- 1 | package renderHandlers 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | ) 6 | 7 | type EvaluationHandler interface { 8 | New(ctx *gin.Context) 9 | Show(ctx *gin.Context) 10 | } 11 | 12 | type EvaluationHandlerImpl struct { 13 | isSmallFooter bool 14 | } 15 | 16 | func NewEvaluationHandler() EvaluationHandler { 17 | return &EvaluationHandlerImpl{ 18 | isSmallFooter: true, 19 | } 20 | } 21 | 22 | func (i *EvaluationHandlerImpl) New(ctx *gin.Context) { 23 | data := map[string]interface{}{ 24 | "isSmallFooter": i.isSmallFooter, 25 | } 26 | RenderBaseInstance.RenderTemplate(ctx, "evaluations_new", data) 27 | } 28 | 29 | func (i *EvaluationHandlerImpl) Show(ctx *gin.Context) { 30 | data := map[string]interface{}{ 31 | "evaluationId": ctx.Param("id"), 32 | "isSmallFooter": i.isSmallFooter, 33 | } 34 | RenderBaseInstance.RenderTemplate(ctx, "evaluations_show", data) 35 | } 36 | -------------------------------------------------------------------------------- /internal/handlers/render/finetune.go: -------------------------------------------------------------------------------- 1 | package renderHandlers 2 | 3 | type FinetuneHandler interface { 4 | BaseHandler 5 | } 6 | 7 | type FinetuneHandlerImpl struct { 8 | BaseHandlerImpl 9 | } 10 | 11 | func NewFinetuneHandler() FinetuneHandler { 12 | return &FinetuneHandlerImpl{ 13 | BaseHandlerImpl{ 14 | resourceType: "finetunes", 15 | }, 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /internal/handlers/render/mcp_server.go: -------------------------------------------------------------------------------- 1 | package renderHandlers 2 | 3 | type McpServerHandler interface { 4 | BaseHandler 5 | } 6 | 7 | type McpServerHandlerImpl struct { 8 | BaseHandlerImpl 9 | } 10 | 11 | func NewMcpServerHandler() McpServerHandler { 12 | return &McpServerHandlerImpl{ 13 | BaseHandlerImpl{ 14 | resourceType: "mcp_servers", 15 | }, 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /internal/handlers/render/models.go: -------------------------------------------------------------------------------- 1 | package renderHandlers 2 | 3 | type ModelHandler interface { 4 | BaseHandler 5 | } 6 | 7 | type ModelHandlerImpl struct { 8 | BaseHandlerImpl 9 | } 10 | 11 | func NewModelHandler() ModelHandler { 12 | return &ModelHandlerImpl{ 13 | BaseHandlerImpl{ 14 | resourceType: "models", 15 | }, 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /internal/handlers/render/resource_console.go: -------------------------------------------------------------------------------- 1 | package renderHandlers 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | ) 6 | 7 | type ResourceConsoleHandler interface { 8 | Index(ctx *gin.Context) 9 | } 10 | 11 | type ResourceConsoleHandlerImpl struct { 12 | } 13 | 14 | func NewResourceConsoleHandler() *ResourceConsoleHandlerImpl { 15 | return &ResourceConsoleHandlerImpl{} 16 | } 17 | 18 | func (i *ResourceConsoleHandlerImpl) Index(ctx *gin.Context) { 19 | RenderBaseInstance.RenderTemplate(ctx, "resource_console_index", nil) 20 | } 21 | -------------------------------------------------------------------------------- /internal/handlers/render/settings.go: -------------------------------------------------------------------------------- 1 | package renderHandlers 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "opencsg.com/portal/internal/svc" 6 | ) 7 | 8 | type SettingHandler interface { 9 | Profile(ctx *gin.Context) 10 | AccessToken(ctx *gin.Context) 11 | SSHKeys(ctx *gin.Context) 12 | } 13 | 14 | type SettingHandlerImpl struct { 15 | svcCtx *svc.ServiceContext 16 | } 17 | 18 | func NewSettingHandler(svcCtx *svc.ServiceContext) SettingHandler { 19 | return &SettingHandlerImpl{ 20 | svcCtx: svcCtx, 21 | } 22 | } 23 | 24 | func (i *SettingHandlerImpl) Profile(ctx *gin.Context) { 25 | 26 | RenderBaseInstance.RenderTemplate(ctx, "settings_profile", nil) 27 | } 28 | 29 | func (i *SettingHandlerImpl) AccessToken(ctx *gin.Context) { 30 | RenderBaseInstance.RenderTemplate(ctx, "settings_access_token", nil) 31 | } 32 | 33 | func (i *SettingHandlerImpl) SSHKeys(ctx *gin.Context) { 34 | RenderBaseInstance.RenderTemplate(ctx, "settings_ssh_keys", nil) 35 | } 36 | -------------------------------------------------------------------------------- /internal/handlers/render/spaces.go: -------------------------------------------------------------------------------- 1 | package renderHandlers 2 | 3 | type SpaceHandler interface { 4 | BaseHandler 5 | } 6 | 7 | type SpaceHandlerImpl struct { 8 | BaseHandlerImpl 9 | } 10 | 11 | func NewSpaceHandler() SpaceHandler { 12 | return &SpaceHandlerImpl{ 13 | BaseHandlerImpl{ 14 | resourceType: "spaces", 15 | }, 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /internal/middleware/cache_control.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/gin-gonic/gin" 7 | ) 8 | 9 | func (a *MiddlewareImpl) CacheControlMiddleware() gin.HandlerFunc { 10 | return func(c *gin.Context) { 11 | if strings.HasPrefix(c.Request.URL.Path, "/assets/") { 12 | c.Header("Cache-Control", "public, max-age=2592000") 13 | } 14 | c.Next() 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /internal/middleware/middleware.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "opencsg.com/portal/pkg/server/backend" 6 | "opencsg.com/portal/pkg/utils/jwt" 7 | ) 8 | 9 | type Middleware interface { 10 | AuthMiddleware(csghubServer backend.Server) gin.HandlerFunc 11 | CheckCurrentUser() gin.HandlerFunc 12 | AuthenticateAdminUser() gin.HandlerFunc 13 | Log() gin.HandlerFunc 14 | CacheControlMiddleware() gin.HandlerFunc 15 | } 16 | 17 | type MiddlewareImpl struct { 18 | jwtUtils jwt.JwtUtils 19 | } 20 | 21 | func NewMiddleware() Middleware { 22 | return &MiddlewareImpl{ 23 | jwtUtils: jwt.NewJwtUtils(), 24 | } 25 | } 26 | 27 | var Instance = NewMiddleware() 28 | -------------------------------------------------------------------------------- /internal/routes/admin.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "opencsg.com/portal/internal/middleware" 6 | ) 7 | 8 | func registerAdminRoutes(engine *gin.Engine, handlersRegistry *HandlersRegistry) { 9 | adminRoute := engine.Group("/admin_old") 10 | adminRoute.Use(middleware.Instance.AuthenticateAdminUser()) 11 | 12 | adminRoute.GET("", handlersRegistry.RenderHandler.AdminHandler.Index) 13 | adminRoute.GET("/*path", handlersRegistry.RenderHandler.AdminHandler.Index) 14 | 15 | adminNextRoute := engine.Group("/admin_panel") 16 | adminNextRoute.Use(middleware.Instance.AuthenticateAdminUser()) 17 | adminNextRoute.GET("", handlersRegistry.RenderHandler.AdminHandler.IndexNext) 18 | adminNextRoute.GET("/*path", handlersRegistry.RenderHandler.AdminHandler.IndexNext) 19 | } 20 | -------------------------------------------------------------------------------- /internal/routes/collections.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | ) 6 | 7 | func registerCollectionRoutes(engine *gin.Engine, handlersRegistry *HandlersRegistry) { 8 | engine.GET("/collections", handlersRegistry.RenderHandler.CollectionsHandler.Index) 9 | engine.GET("/collections/new", handlersRegistry.RenderHandler.CollectionsHandler.New) 10 | engine.GET("/collections/:collections_id", handlersRegistry.RenderHandler.CollectionsHandler.Show) 11 | engine.GET("/collections/:collections_id/*path", handlersRegistry.RenderHandler.CollectionsHandler.Show) 12 | } 13 | -------------------------------------------------------------------------------- /internal/routes/datapipelines.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "opencsg.com/portal/internal/middleware" 6 | ) 7 | 8 | func registerDatapipelinesRoutes(engine *gin.Engine, handlersRegistry *HandlersRegistry) { 9 | datapipelinesRoute := engine.Group("/datapipelines") 10 | datapipelinesRoute.Use(middleware.Instance.CheckCurrentUser()) 11 | datapipelinesRoute.GET("", handlersRegistry.RenderHandler.DatapipelinesHandler.Index) 12 | datapipelinesRoute.GET("/*path", handlersRegistry.RenderHandler.DatapipelinesHandler.Index) 13 | } 14 | -------------------------------------------------------------------------------- /internal/routes/error.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | ) 6 | 7 | func registerErrorRoutes(engine *gin.Engine, handlersRegistry *HandlersRegistry) { 8 | engine.GET("/errors/not-found", handlersRegistry.RenderHandler.ErrorHandler.NotFound) 9 | engine.GET("/errors/unauthorized", handlersRegistry.RenderHandler.ErrorHandler.Unauthorized) 10 | engine.GET("/errors/login-failed", handlersRegistry.RenderHandler.ErrorHandler.LoginFailed) 11 | engine.GET("/errors/server-error", handlersRegistry.RenderHandler.ErrorHandler.ServerError) 12 | } 13 | -------------------------------------------------------------------------------- /internal/routes/evaluation.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "opencsg.com/portal/internal/middleware" 6 | ) 7 | 8 | func registerEvaluationRoutes(engine *gin.Engine, handlersRegistry *HandlersRegistry) { 9 | evaluationRoutes := engine.Group("/evaluations") 10 | evaluationRoutes.Use(middleware.Instance.CheckCurrentUser()) 11 | evaluationRoutes.GET("/new", handlersRegistry.RenderHandler.EvaluationHandler.New) 12 | evaluationRoutes.GET("/:id", handlersRegistry.RenderHandler.EvaluationHandler.Show) 13 | } 14 | -------------------------------------------------------------------------------- /internal/routes/finetune.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "opencsg.com/portal/internal/middleware" 6 | ) 7 | 8 | func registerFinetuneRoutes(engine *gin.Engine, handlersRegistry *HandlersRegistry) { 9 | finetuneRoutes := engine.Group("/finetune") 10 | finetuneRoutes.Use(middleware.Instance.CheckCurrentUser()) 11 | finetuneRoutes.GET("/:namespace/:model_name/:finetune_name/:finetune_id", handlersRegistry.RenderHandler.FinetuneHandler.Detail) 12 | finetuneRoutes.GET("/:namespace/:model_name/:finetune_name/:finetune_id/*path", handlersRegistry.RenderHandler.FinetuneHandler.Detail) 13 | finetuneRoutes.GET("/new", handlersRegistry.RenderHandler.FinetuneHandler.New) 14 | } 15 | -------------------------------------------------------------------------------- /internal/routes/home.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | ) 6 | 7 | func registerHomeRoutes(engine *gin.Engine, handlersRegistry *HandlersRegistry) { 8 | engine.GET("/", handlersRegistry.RenderHandler.ModelHandler.List) 9 | } 10 | -------------------------------------------------------------------------------- /internal/routes/organization.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | ) 6 | 7 | func registerOrganizationRoutes(engine *gin.Engine, handlersRegistry *HandlersRegistry) { 8 | engine.GET("/organizations/:id/edit", handlersRegistry.RenderHandler.OrganizationHandler.Edit) 9 | engine.GET("/organizations/new", handlersRegistry.RenderHandler.OrganizationHandler.New) 10 | engine.GET("/organizations/:id", handlersRegistry.RenderHandler.OrganizationHandler.Show) 11 | engine.GET("/organizations/:id/members", handlersRegistry.RenderHandler.OrganizationHandler.Members) 12 | } 13 | -------------------------------------------------------------------------------- /internal/routes/profile.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | ) 6 | 7 | func registerProfileRoutes(engine *gin.Engine, handlersRegistry *HandlersRegistry) { 8 | engine.GET("/profile/:user_id", handlersRegistry.RenderHandler.ProfileHandler.Detail) 9 | engine.GET("/profile/likes/:user_id", handlersRegistry.RenderHandler.ProfileHandler.Likes) 10 | } 11 | -------------------------------------------------------------------------------- /internal/routes/prompts.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import "github.com/gin-gonic/gin" 4 | 5 | func registerPromptsRoutes(engine *gin.Engine, handlersRegistry *HandlersRegistry) { 6 | engine.GET("/prompts/library/:namespace/:name/:path", handlersRegistry.RenderHandler.PromptsHandler.Index) 7 | engine.GET("/prompts/library/:namespace/:name", handlersRegistry.RenderHandler.PromptsHandler.Index) 8 | engine.GET("/prompts/library", handlersRegistry.RenderHandler.PromptsHandler.Index) 9 | } 10 | -------------------------------------------------------------------------------- /internal/routes/resource_console.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "opencsg.com/portal/internal/middleware" 6 | ) 7 | 8 | func registerResourceConsoleRoutes(engine *gin.Engine, handlersRegistry *HandlersRegistry) { 9 | resourceConsoleRoutes := engine.Group("") 10 | resourceConsoleRoutes.Use(middleware.Instance.CheckCurrentUser()) 11 | resourceConsoleRoutes.GET("/resource-console", handlersRegistry.RenderHandler.ResourceConsoleHandler.Index) 12 | } 13 | -------------------------------------------------------------------------------- /internal/routes/session.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | ) 6 | 7 | func registerSessionsRoutes(engine *gin.Engine, handlersRegistry *HandlersRegistry) { 8 | engine.GET("/signup", handlersRegistry.RenderHandler.SessionHandler.SignUp) 9 | engine.GET("/login", handlersRegistry.RenderHandler.SessionHandler.Login) 10 | engine.GET("/logout", handlersRegistry.RenderHandler.SessionHandler.Logout) 11 | engine.GET("/server/callback", handlersRegistry.RenderHandler.SessionHandler.Create) 12 | } 13 | -------------------------------------------------------------------------------- /internal/routes/setting.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "opencsg.com/portal/internal/middleware" 6 | ) 7 | 8 | func registerSettingRoutes(engine *gin.Engine, handlersRegistry *HandlersRegistry) { 9 | settingRoute := engine.Group("/settings") 10 | 11 | settingRoute.Use(middleware.Instance.CheckCurrentUser()) 12 | 13 | settingRoute.GET("/profile", handlersRegistry.RenderHandler.SettingHandler.Profile) 14 | settingRoute.GET("/access-token", handlersRegistry.RenderHandler.SettingHandler.AccessToken) 15 | settingRoute.GET("/ssh-keys", handlersRegistry.RenderHandler.SettingHandler.SSHKeys) 16 | } 17 | -------------------------------------------------------------------------------- /internal/services/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/internal/services/.keep -------------------------------------------------------------------------------- /internal/svc/serviceContext.go: -------------------------------------------------------------------------------- 1 | package svc 2 | 3 | import ( 4 | "opencsg.com/portal/config" 5 | ) 6 | 7 | type ServiceContext struct { 8 | // redis 9 | // mq 10 | // async 11 | // worker 12 | // other service will be added here 13 | Config *config.Config 14 | } 15 | 16 | func NewServiceContext(cfg *config.Config) (*ServiceContext, error) { 17 | return &ServiceContext{ 18 | Config: cfg, 19 | }, nil 20 | } 21 | -------------------------------------------------------------------------------- /pkg/database/migrations/placeholder.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCSGs/csghub/b21ba0887eb73ced16b40fa8330bae96955e6f8d/pkg/database/migrations/placeholder.sql -------------------------------------------------------------------------------- /pkg/s3/minio.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "github.com/minio/minio-go/v7" 5 | "github.com/minio/minio-go/v7/pkg/credentials" 6 | "opencsg.com/portal/config" 7 | ) 8 | 9 | func NewMinio(cfg *config.Config) (*Client, error) { 10 | minioClient, err := minio.New(cfg.S3.Endpoint, &minio.Options{ 11 | Creds: credentials.NewStaticV4(cfg.S3.AccessKeyID, cfg.S3.AccessKeySecret, ""), 12 | Secure: cfg.S3.EnableSSL, 13 | BucketLookup: minio.BucketLookupAuto, 14 | Region: cfg.S3.Region, 15 | }) 16 | if err != nil { 17 | return nil, err 18 | } 19 | 20 | return &Client{ 21 | Client: *minioClient, 22 | Bucket: cfg.S3.Bucket, 23 | }, nil 24 | } 25 | 26 | type Client struct { 27 | minio.Client 28 | Bucket string 29 | } 30 | -------------------------------------------------------------------------------- /pkg/server/backend/csghubserver/download.go: -------------------------------------------------------------------------------- 1 | package csghubserver 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | 7 | "opencsg.com/portal/pkg/server/types" 8 | ) 9 | 10 | func (c *CsgHubServer) DownloadFile(req types.DownloadReq) ([]byte, *http.Response, error) { 11 | data, resp, err := c.getResponse( 12 | "GET", 13 | fmt.Sprintf("/%s/%s/%s/resolve/%s?current_user=%s&ref=%s", req.RepoType, req.Namespace, req.Name, req.FilePath, req.CurrentUser, req.Ref), 14 | nil, 15 | nil, 16 | ) 17 | return data, resp, err 18 | } 19 | 20 | func (c *CsgHubServer) DownloadFileRaw(req types.DownloadReq) (*types.DownloadFileRawResp, *http.Response, error) { 21 | s := new(types.DownloadFileRawResp) 22 | resp, err := c.getParsedResponse( 23 | "GET", 24 | fmt.Sprintf("/%s/%s/%s/raw/%s?current_user=%s&ref=%s", req.RepoType, req.Namespace, req.Name, req.FilePath, req.CurrentUser, req.Ref), 25 | nil, 26 | nil, 27 | s, 28 | ) 29 | return s, resp, err 30 | } 31 | -------------------------------------------------------------------------------- /pkg/server/backend/csghubserver/sensitive_check.go: -------------------------------------------------------------------------------- 1 | package csghubserver 2 | 3 | import ( 4 | "encoding/json" 5 | "net/http" 6 | 7 | "opencsg.com/portal/pkg/server/types" 8 | ) 9 | 10 | // Check if image has sensitive content 11 | func (c *CsgHubServer) ImageSecureCheck(req types.ImageSensitiveCheckReq) (*types.ImageSensitiveCheckResp, *http.Response, error) { 12 | checkResp := new(types.ImageSensitiveCheckResp) 13 | body, err := json.Marshal(&req) 14 | if err != nil { 15 | return nil, nil, err 16 | } 17 | resp, err := c.getParsedResponse( 18 | "POST", 19 | "/sensitive/image", 20 | nil, 21 | body, 22 | checkResp, 23 | ) 24 | return checkResp, resp, err 25 | } 26 | -------------------------------------------------------------------------------- /pkg/server/backend/csghubserver/user.go: -------------------------------------------------------------------------------- 1 | package csghubserver 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | 7 | "opencsg.com/portal/pkg/server/types" 8 | ) 9 | 10 | func (c *CsgHubServer) GetUserInfo(uuid string) (*types.VerifyJWTTokenResp, *http.Response, error) { 11 | userResp := new(types.VerifyJWTTokenResp) 12 | 13 | resp, err := c.getParsedResponse( 14 | "GET", 15 | fmt.Sprintf("/user/%s?type=uuid", uuid), 16 | nil, 17 | nil, 18 | userResp, 19 | ) 20 | return userResp, resp, err 21 | } 22 | 23 | func (c *CsgHubServer) GetUserInfoByUsername(username string) (*types.VerifyJWTTokenResp, *http.Response, error) { 24 | userResp := new(types.VerifyJWTTokenResp) 25 | 26 | resp, err := c.getParsedResponse( 27 | "GET", 28 | fmt.Sprintf("/user/%s", username), 29 | nil, 30 | nil, 31 | userResp, 32 | ) 33 | return userResp, resp, err 34 | } 35 | -------------------------------------------------------------------------------- /pkg/server/backend/interface.go: -------------------------------------------------------------------------------- 1 | package backend 2 | 3 | import ( 4 | "net/http" 5 | 6 | "opencsg.com/portal/pkg/server/types" 7 | ) 8 | 9 | type Server interface { 10 | VerifyJWTToken(token string) (*types.User, *http.Response, error) 11 | ImageSecureCheck(req types.ImageSensitiveCheckReq) (*types.ImageSensitiveCheckResp, *http.Response, error) 12 | CreateJWTToken(req types.CreateJWTReq) (*types.CreateJWTResp, *http.Response, error) 13 | DownloadFileRaw(req types.DownloadReq) (*types.DownloadFileRawResp, *http.Response, error) 14 | DownloadFile(req types.DownloadReq) ([]byte, *http.Response, error) 15 | GetUserInfo(uuid string) (*types.VerifyJWTTokenResp, *http.Response, error) 16 | GetUserInfoByUsername(username string) (*types.VerifyJWTTokenResp, *http.Response, error) 17 | } 18 | -------------------------------------------------------------------------------- /pkg/server/server.go: -------------------------------------------------------------------------------- 1 | package server 2 | 3 | import ( 4 | "context" 5 | 6 | "opencsg.com/portal/config" 7 | "opencsg.com/portal/pkg/server/backend" 8 | "opencsg.com/portal/pkg/server/backend/csghubserver" 9 | ) 10 | 11 | func NewServer(config *config.Config) (backend.Server, error) { 12 | server, err := csghubserver.NewCsgHubServer( 13 | context.Background(), 14 | config.StarhubServer.BaseURL, 15 | config.StarhubServer.APIKey, 16 | ) 17 | if err != nil { 18 | return nil, err 19 | } 20 | return server, nil 21 | } 22 | -------------------------------------------------------------------------------- /pkg/server/types/download.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | type RepoType string 4 | 5 | const ( 6 | RepoTypeModel RepoType = "model" 7 | RepoTypeDataset RepoType = "dataset" 8 | RepoTypeSpace RepoType = "space" 9 | RepoTypeCode RepoType = "code" 10 | ) 11 | 12 | type DownloadReq struct { 13 | RepoType RepoType `json:"repo_type"` 14 | Namespace string `json:"namespace"` 15 | Name string `json:"name"` 16 | FilePath string `json:"file_path"` 17 | CurrentUser string `json:"current_user"` 18 | Ref string `json:"ref"` 19 | } 20 | 21 | type DownloadFileRawResp struct { 22 | Message string `json:"msg"` 23 | Data string `json:"data"` 24 | } 25 | -------------------------------------------------------------------------------- /pkg/server/types/sensitive.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | type ImageSensitiveCheckResp struct { 4 | Message string `json:"msg"` 5 | Data string `json:"data"` 6 | } 7 | 8 | type ImageSensitiveCheckReq struct { 9 | Scenario string `json:"scenario"` 10 | OssBucketName string `json:"oss_bucket_name"` 11 | OssObjectName string `json:"oss_object_name"` 12 | } 13 | -------------------------------------------------------------------------------- /pkg/server/types/user.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | type UserResp struct { 4 | ID int64 `json:"id"` 5 | Nickname string `json:"nickname"` 6 | Name string `json:"username"` 7 | Email string `json:"email"` 8 | LoginIdentity string `json:"uuid"` 9 | Gender string `json:"gender"` 10 | Roles []string `json:"roles"` 11 | Phone string `json:"phone"` 12 | } 13 | -------------------------------------------------------------------------------- /pkg/testutils/testutils.go: -------------------------------------------------------------------------------- 1 | package testutils 2 | -------------------------------------------------------------------------------- /pkg/types/constants.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | type GlobalConfig struct { 4 | ServerBaseUrl string 5 | OnPremise bool 6 | EnableHttps bool 7 | } 8 | -------------------------------------------------------------------------------- /pkg/types/enum/enum.go: -------------------------------------------------------------------------------- 1 | package enum 2 | 3 | const ( 4 | PublicVisibility = "public" 5 | PrivateVisibility = "private" 6 | ) 7 | 8 | const ( 9 | DefaultLocale = "zh" 10 | EnglishLocale = "en" 11 | LocaleCookieKey = "locale" 12 | LocaleQueryKey = "locale" 13 | ) 14 | -------------------------------------------------------------------------------- /pkg/types/errors.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import "errors" 4 | 5 | var ( 6 | NotFoundError = errors.New("not found") 7 | InternalError = errors.New("internal error") 8 | AuthError = errors.New("auth error") 9 | ) 10 | -------------------------------------------------------------------------------- /pkg/utils/jwt/jwt.go: -------------------------------------------------------------------------------- 1 | package jwt 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "opencsg.com/portal/internal/models" 6 | ) 7 | 8 | type JwtUtils interface { 9 | GetCurrentUser(ctx *gin.Context) *models.User 10 | } 11 | 12 | type JwtUtilsImpl struct { 13 | } 14 | 15 | func NewJwtUtils() JwtUtils { 16 | return &JwtUtilsImpl{} 17 | } 18 | 19 | func (j *JwtUtilsImpl) GetCurrentUser(ctx *gin.Context) *models.User { 20 | if user, exists := ctx.Get("currentUser"); exists { 21 | return user.(*models.User) 22 | } else { 23 | // return &models.User{} 24 | return nil 25 | } 26 | } 27 | --------------------------------------------------------------------------------