chore!: clean type alias
This commit is contained in:
2 files changed
+2
-6
No files matched your search
@@ -4,9 +4,7 @@ import { requestHeaders, requestURL, responseJSON } from '@xsai/shared'
|
||||
|
||||
import type { Model } from '../types/model'
|
||||
|
||||
export interface RetrieveModelOptions extends CommonRequestOptions {}
|
||||
|
||||
export const retrieveModel = async (options: RetrieveModelOptions): Promise<Model> =>
|
||||
export const retrieveModel = async (options: CommonRequestOptions): Promise<Model> =>
|
||||
(options.fetch ?? globalThis.fetch)(requestURL(`models/${options.model}`, options.baseURL), {
|
||||
headers: requestHeaders(options.headers, options.apiKey),
|
||||
signal: options.abortSignal,
|
||||
|
||||
@@ -2,14 +2,12 @@ import type { ExtractReasoningOptions } from './extract-reasoning'
|
||||
|
||||
import { getPartialMatchIndex } from './_get-partial-match-index'
|
||||
|
||||
export interface ExtractReasoningStreamOptions extends ExtractReasoningOptions {}
|
||||
|
||||
export interface ExtractReasoningStreamResult {
|
||||
reasoningStream: ReadableStream<string>
|
||||
textStream: ReadableStream<string>
|
||||
}
|
||||
|
||||
export const extractReasoningStream = (stream: ReadableStream<string>, options: ExtractReasoningStreamOptions = {
|
||||
export const extractReasoningStream = (stream: ReadableStream<string>, options: ExtractReasoningOptions = {
|
||||
tagName: 'think',
|
||||
}): ExtractReasoningStreamResult => {
|
||||
const startTag = `<${options.tagName}>`
|
||||
|
||||
Reference in new issue
Block a user