LLMs: bits

This commit is contained in:
Enrico Ros
2025-02-13 21:06:00 -08:00
parent d9cf91d2f0
commit cb0a54fe2b
2 changed files with 6 additions and 7 deletions
+1 -2
View File
@@ -10,7 +10,6 @@ import { createBeamVanillaStore } from '~/modules/beam/store-beam_vanilla';
import { OptimaToolbarIn } from '~/common/layout/optima/portals/OptimaPortalsIn';
import { createDConversation, DConversation } from '~/common/stores/chat/chat.conversation';
import { createDMessageTextContent, DMessage } from '~/common/stores/chat/chat.message';
import { getChatLLMId } from '~/common/stores/llms/store-llms';
import { useIsMobile } from '~/common/components/useMatchMedia';
@@ -22,7 +21,7 @@ function initTestConversation(): DConversation {
}
function initTestBeamStore(messages: DMessage[], beamStore: BeamStoreApi = createBeamVanillaStore()): BeamStoreApi {
beamStore.getState().open(messages, getChatLLMId(), false, (content) => alert(content));
beamStore.getState().open(messages, null, false, (content) => alert(content));
return beamStore;
}
+5 -5
View File
@@ -107,7 +107,7 @@ export function Telephone(props: {
const responseAbortController = React.useRef<AbortController | null>(null);
// external state
const { chatLLMId, chatLLMDropdown } = useChatLLMDropdown(llmDropdownRef);
const { chatLLMId: modelId, chatLLMDropdown: modelDropdown } = useChatLLMDropdown(llmDropdownRef);
const { chatTitle, reMessages } = useChatStore(useShallow(state => {
const conversation = props.callIntent.conversationId
? state.conversations.find(conversation => conversation.id === props.callIntent.conversationId) ?? null
@@ -226,7 +226,7 @@ export function Telephone(props: {
}
// bail if no llm selected
if (!chatLLMId) return;
if (!modelId) return;
// Call Message Generation Prompt
@@ -249,7 +249,7 @@ export function Telephone(props: {
setPersonaTextInterim('💭...');
aixChatGenerateContent_DMessage_FromConversation(
chatLLMId,
modelId,
callSystemInstruction,
callGenerationInputHistory,
'call',
@@ -285,7 +285,7 @@ export function Telephone(props: {
responseAbortController.current?.abort();
responseAbortController.current = null;
};
}, [isConnected, callMessages, chatLLMId, personaVoiceId, personaSystemMessage, reMessages]);
}, [isConnected, callMessages, modelId, personaVoiceId, personaSystemMessage, reMessages]);
// [E] Message interrupter
const abortTrigger = isConnected && recognitionState.hasSpeech;
@@ -326,7 +326,7 @@ export function Telephone(props: {
return <>
<OptimaToolbarIn>{chatLLMDropdown}</OptimaToolbarIn>
<OptimaToolbarIn>{modelDropdown}</OptimaToolbarIn>
<Typography
level='h1'