Skip to content

Commit

Permalink
fix: Fix the problem of abnormal functionCall variable judgment
Browse files Browse the repository at this point in the history
  • Loading branch information
Amery2010 committed Feb 10, 2025
1 parent f26a985 commit f5d88e8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion app/api/chat/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export async function POST(req: NextRequest) {
try {
let url = `${geminiApiBaseUrl || GEMINI_API_BASE_URL}/${version}/models/${model}`
if (!model.startsWith('imagen')) url += '?alt=sse'
console.log(url)
const response = await fetch(url, {
method: 'POST',
headers: {
Expand Down
2 changes: 1 addition & 1 deletion app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ export default function Home() {
<div
className={cn(
'group text-slate-500 transition-colors last:text-slate-800 hover:text-slate-800 dark:last:text-slate-400 dark:hover:text-slate-400 max-sm:hover:bg-transparent',
msg.role === 'model' && msg.parts && msg.parts[0].functionCall ? 'hidden' : '',
msg.role === 'model' && msg.parts && msg.parts[0]?.functionCall ? 'hidden' : '',
)}
key={msg.id}
>
Expand Down
2 changes: 1 addition & 1 deletion components/AppSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function ConversationItem(props: Props) {
let mdContentList: string[] = []

const wrapJsonCode = (content: string) => {
return `\`\`\`json \n${content} \n\`\`\``
return `\`\`\`json\n${content}\n\`\`\``
}

if (conversation.systemInstruction) {
Expand Down

0 comments on commit f5d88e8

Please sign in to comment.