Skip to main content
Glama
model-config-block.tsx•2.37 kB
"use client" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" import { ModelConfigDialog } from "./model-config-dialog" import type { ChatInterface, ModelConfig, ProviderType, ResearchAgentInterface } from "@/lib/types" interface ModelConfigBlockProps { chat: ChatInterface | null } export function ModelConfigBlock({ chat }: ModelConfigBlockProps) { if (!chat?.modelConfig) { console.error("ModelConfigBlock: chat or Research is null") return null } const handleConfigChange = (config: ModelConfig) => { if (chat?.updateModelConfig) { chat.updateModelConfig(config) } } return ( <Card className="mt-4"> <CardHeader className="pb-2"> <div className="flex items-center justify-between"> <div className="flex items-center"> <CardTitle className="text-sm font-medium">Model Configuration</CardTitle> <ModelConfigDialog config={chat.modelConfig} onConfigChange={handleConfigChange} disabled={chat.status === "streaming" || chat.status === "submitted"} buttonClassName="h-6 w-6" /> </div> <CardDescription className="text-xs text-foreground">{chat?.responseSelectModel && `${chat.responseSelectModel}`} {chat?.responseReasoningType === "Thinking"? " 🧠 " : " 🤖 "} {chat?.responseReasoningType && `${chat.responseReasoningType}`}</CardDescription> </div> </CardHeader> <CardContent> <div className="grid grid-cols-3 gap-2 text-sm"> <div className="flex flex-col"> <span className="text-muted-foreground">Temperature</span> <span className="font-mono">{chat.responseModelConfig?.temperature.toFixed(2)}</span> </div> <div className="flex flex-col"> <span className="text-muted-foreground">Top P</span> <span className="font-mono">{chat.responseModelConfig && chat.responseModelConfig.topP?.toFixed(2)}</span> </div> <div className="flex flex-col"> <span className="text-muted-foreground">Max Tokens</span> <span className="font-mono">{chat.responseModelConfig?.maxTokens.toLocaleString()}</span> </div> </div> </CardContent> </Card> ) }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/myeong-ga/research-agent-mcp-0.36-pro-preview-06-01'

If you have feedback or need assistance with the MCP directory API, please join our Discord server