vanilla api
This commit is contained in:
117
index.html
117
index.html
@@ -15,38 +15,129 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2>
|
||||
<h3>
|
||||
<img
|
||||
id="logo"
|
||||
src="assets/img/logo.svg"
|
||||
alt="幕间UGC模版"
|
||||
/>幕间UGC自定义界面项目模版
|
||||
</h2>
|
||||
</h3>
|
||||
|
||||
<h3>获取项目信息</h3>
|
||||
<h4>获取项目信息</h4>
|
||||
|
||||
<div id="project-info"></div>
|
||||
<div id="project-info" class="text-sm"></div>
|
||||
|
||||
<div>
|
||||
这是作品封面,你可以获取到
|
||||
<img id="project-info-img" src="" alt="封面图" />
|
||||
</div>
|
||||
|
||||
<h3>Chat示例</h3>
|
||||
<button class="ui-button ui-widget ui-corner-all" onclick="window.location.href = '/chat'">前往Chat示例</button>
|
||||
<h4>获取当前人设</h4>
|
||||
<div id="persona-info" class="text-sm"></div>
|
||||
|
||||
|
||||
<h3>获取当前人设</h3>
|
||||
<div id="persona-info"></div>
|
||||
|
||||
|
||||
<h3>三方库示例</h3>
|
||||
<h4>三方库示例</h4>
|
||||
<i class="fa-solid fa-user"></i>
|
||||
<button class="ui-button ui-widget ui-corner-all">jquery-ui按钮</button>
|
||||
|
||||
<div class="flex gap-2">
|
||||
<h4>
|
||||
Chat示例
|
||||
<button
|
||||
class="ui-button ui-widget ui-corner-all"
|
||||
onclick="window.location.href = '/chat.html'"
|
||||
>
|
||||
前往Chat示例
|
||||
</button>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<h4>
|
||||
文字补全 示例 (非流式)
|
||||
<button
|
||||
class="ui-button ui-widget ui-corner-all"
|
||||
id="text-completion-button"
|
||||
>
|
||||
触发文字补全
|
||||
</button>
|
||||
</h4>
|
||||
<div id="text-completion-result"></div>
|
||||
|
||||
<h4>
|
||||
文字补全 示例 (流式)
|
||||
<button
|
||||
class="ui-button ui-widget ui-corner-all"
|
||||
id="text-completion-stream-button"
|
||||
>
|
||||
触发文字补全
|
||||
</button>
|
||||
</h4>
|
||||
<div id="text-completion-stream-result"></div>
|
||||
|
||||
<h4>
|
||||
对话补全 示例 (非流式)
|
||||
<button
|
||||
class="ui-button ui-widget ui-corner-all"
|
||||
id="chat-completion-button"
|
||||
>
|
||||
触发对话补全
|
||||
</button>
|
||||
</h4>
|
||||
<div id="chat-completion-result"></div>
|
||||
|
||||
<h4>
|
||||
对话补全 示例 (流式)
|
||||
<button
|
||||
class="ui-button ui-widget ui-corner-all"
|
||||
id="chat-completion-stream-button"
|
||||
>
|
||||
触发对话补全
|
||||
</button>
|
||||
</h4>
|
||||
<div id="chat-completion-stream-result"></div>
|
||||
|
||||
<h4>
|
||||
Responses 示例 (非流式)
|
||||
<button class="ui-button ui-widget ui-corner-all" id="responses-button">
|
||||
触发Responses
|
||||
</button>
|
||||
</h4>
|
||||
<div id="responses-result"></div>
|
||||
|
||||
<h4>
|
||||
Responses 示例 (流式)
|
||||
<button
|
||||
class="ui-button ui-widget ui-corner-all"
|
||||
id="responses-stream-button"
|
||||
>
|
||||
触发Responses
|
||||
</button>
|
||||
</h4>
|
||||
<div id="responses-stream-result"></div>
|
||||
|
||||
<h4>
|
||||
图像生成 示例(非流式)
|
||||
<button
|
||||
class="ui-button ui-widget ui-corner-all"
|
||||
id="image-generation-button"
|
||||
>
|
||||
触发图像生成
|
||||
</button>
|
||||
</h4>
|
||||
<div id="image-generation-result"></div>
|
||||
|
||||
<h4>
|
||||
图像生成 示例(流式)
|
||||
<button
|
||||
class="ui-button ui-widget ui-corner-all"
|
||||
id="image-generation-stream-button"
|
||||
>
|
||||
触发图像生成
|
||||
</button>
|
||||
</h4>
|
||||
<div id="image-generation-stream-result"></div>
|
||||
|
||||
<!-- 幕间官方SDK -->
|
||||
<script src="https://npm.onmicrosoft.cn/@mujian/js-sdk@0.0.6-beta.41/dist/umd/index.js"></script>
|
||||
<script src="https://npm.onmicrosoft.cn/@mujian/js-sdk@0.0.6-beta.45/dist/umd/index.js"></script>
|
||||
<!-- 第三方库:JQuery - 主要用于提供便利地操作页面元素的函数 -->
|
||||
<script src="https://npm.onmicrosoft.cn/jquery@3.7.1/dist/jquery.min.js"></script>
|
||||
<!-- 第三方库:JQuery-UI - 主要用于提供基础的UI控件 -->
|
||||
|
||||
Reference in New Issue
Block a user