mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-09 23:36:02 +00:00
* feat: add embeddings model management backend support Co-Authored-By: Junyan Qin <Chin> <rockchinq@gmail.com> * feat: add embeddings model management frontend support Co-Authored-By: Junyan Qin <Chin> <rockchinq@gmail.com> * chore: revert HttpClient URL to production setting Co-Authored-By: Junyan Qin <Chin> <rockchinq@gmail.com> * refactor: integrate embeddings models into models page with tabs Co-Authored-By: Junyan Qin <Chin> <rockchinq@gmail.com> * perf: move files * perf: remove `s` * feat: allow requester to declare supported types in manifest * feat(embedding): delete dimension and encoding format * feat: add extra_args for embedding moels * perf: i18n ref * fix: linter err * fix: lint err * fix: linter err --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Junyan Qin <Chin> <rockchinq@gmail.com>
54 lines
3.4 KiB
TypeScript
54 lines
3.4 KiB
TypeScript
import styles from './EmbeddingCard.module.css';
|
|
import { EmbeddingCardVO } from '@/app/home/models/component/embedding-card/EmbeddingCardVO';
|
|
|
|
export default function EmbeddingCard({ cardVO }: { cardVO: EmbeddingCardVO }) {
|
|
return (
|
|
<div className={`${styles.cardContainer}`}>
|
|
<div className={`${styles.iconBasicInfoContainer}`}>
|
|
<img
|
|
className={`${styles.iconImage}`}
|
|
src={cardVO.iconURL}
|
|
alt="icon"
|
|
/>
|
|
|
|
<div className={`${styles.basicInfoContainer}`}>
|
|
{/* 名称 */}
|
|
<div className={`${styles.basicInfoText} ${styles.bigText}`}>
|
|
{cardVO.name}
|
|
</div>
|
|
{/* 厂商 */}
|
|
<div className={`${styles.providerContainer}`}>
|
|
<svg
|
|
className={`${styles.providerIcon}`}
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
viewBox="0 0 24 24"
|
|
width="36"
|
|
height="36"
|
|
fill="currentColor"
|
|
>
|
|
<path d="M21 13.2422V20H22V22H2V20H3V13.2422C1.79401 12.435 1 11.0602 1 9.5C1 8.67286 1.22443 7.87621 1.63322 7.19746L4.3453 2.5C4.52393 2.1906 4.85406 2 5.21132 2H18.7887C19.1459 2 19.4761 2.1906 19.6547 2.5L22.3575 7.18172C22.7756 7.87621 23 8.67286 23 9.5C23 11.0602 22.206 12.435 21 13.2422ZM19 13.9725C18.8358 13.9907 18.669 14 18.5 14C17.2409 14 16.0789 13.478 15.25 12.6132C14.4211 13.478 13.2591 14 12 14C10.7409 14 9.5789 13.478 8.75 12.6132C7.9211 13.478 6.75911 14 5.5 14C5.331 14 5.16417 13.9907 5 13.9725V20H19V13.9725ZM5.78865 4L3.35598 8.21321C3.12409 8.59843 3 9.0389 3 9.5C3 10.8807 4.11929 12 5.5 12C6.53096 12 7.44467 11.3703 7.82179 10.4295C8.1574 9.59223 9.3426 9.59223 9.67821 10.4295C10.0553 11.3703 10.969 12 12 12C13.031 12 13.9447 11.3703 14.3218 10.4295C14.6574 9.59223 15.8426 9.59223 16.1782 10.4295C16.5553 11.3703 17.469 12 18.5 12C19.8807 12 21 10.8807 21 9.5C21 9.0389 20.8759 8.59843 20.6347 8.19746L18.2113 4H5.78865Z"></path>
|
|
</svg>
|
|
<span className={`${styles.providerLabel}`}>
|
|
{cardVO.providerLabel}
|
|
</span>
|
|
</div>
|
|
{/* baseURL */}
|
|
<div className={`${styles.baseURLContainer}`}>
|
|
<svg
|
|
className={`${styles.baseURLIcon}`}
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
viewBox="0 0 24 24"
|
|
width="36"
|
|
height="36"
|
|
fill="rgba(98,98,98,1)"
|
|
>
|
|
<path d="M13.0607 8.11097L14.4749 9.52518C17.2086 12.2589 17.2086 16.691 14.4749 19.4247L14.1214 19.7782C11.3877 22.5119 6.95555 22.5119 4.22188 19.7782C1.48821 17.0446 1.48821 12.6124 4.22188 9.87874L5.6361 11.293C3.68348 13.2456 3.68348 16.4114 5.6361 18.364C7.58872 20.3166 10.7545 20.3166 12.7072 18.364L13.0607 18.0105C15.0133 16.0578 15.0133 12.892 13.0607 10.9394L11.6465 9.52518L13.0607 8.11097ZM19.7782 14.1214L18.364 12.7072C20.3166 10.7545 20.3166 7.58872 18.364 5.6361C16.4114 3.68348 13.2456 3.68348 11.293 5.6361L10.9394 5.98965C8.98678 7.94227 8.98678 11.1081 10.9394 13.0607L12.3536 14.4749L10.9394 15.8891L9.52518 14.4749C6.79151 11.7413 6.79151 7.30911 9.52518 4.57544L9.87874 4.22188C12.6124 1.48821 17.0446 1.48821 19.7782 4.22188C22.5119 6.95555 22.5119 11.3877 19.7782 14.1214Z"></path>
|
|
</svg>
|
|
<span className={`${styles.baseURLText}`}>{cardVO.baseURL}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|