Skip to content

Commit

Permalink
remove check vision model
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydzhou committed Jul 9, 2024
1 parent 9d7e19c commit 1149d45
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/client/platforms/bytedance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from "@fortaine/fetch-event-source";
import { prettyObject } from "@/app/utils/format";
import { getClientConfig } from "@/app/config/client";
import { getMessageTextContent, isVisionModel } from "@/app/utils";
import { getMessageTextContent } from "@/app/utils";

export interface OpenAIListModelResponse {
object: string;
Expand Down Expand Up @@ -78,10 +78,9 @@ export class DoubaoApi implements LLMApi {
}

async chat(options: ChatOptions) {
const visionModel = isVisionModel(options.config.model);
const messages = options.messages.map((v) => ({
role: v.role,
content: visionModel ? v.content : getMessageTextContent(v),
content: getMessageTextContent(v),
}));

const modelConfig = {
Expand Down

0 comments on commit 1149d45

Please sign in to comment.