File tree Expand file tree Collapse file tree 8 files changed +10
-9
lines changed 
model-interfaces/langchain/functions/request-handler 
user-interface/react-app/src/components/chatbot Expand file tree Collapse file tree 8 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 11import  os 
22from  langchain .chat_models  import  ChatOpenAI 
33from  ..base  import  ModelAdapter 
4- from  . .registry  import  registry 
4+ from  genai_core .registry  import  registry 
55
66
77class  GPTAdapter (ModelAdapter ):
Original file line number Diff line number Diff line change 55from  langchain .prompts .prompt  import  PromptTemplate 
66
77from  ...base  import  ModelAdapter 
8- from  .. .registry  import  registry 
8+ from  genai_core .registry  import  registry 
99
1010
1111class  FalconLiteContentHandler (LLMContentHandler ):
Original file line number Diff line number Diff line change 44from  langchain .llms .sagemaker_endpoint  import  LLMContentHandler , SagemakerEndpoint 
55
66from  ...base  import  ModelAdapter 
7- from  .. .registry  import  registry 
7+ from  genai_core .registry  import  registry 
88
99from  ...shared .meta .llama2_chat  import  (
1010    Llama2ChatPromptTemplate ,
Original file line number Diff line number Diff line change 55from  langchain .prompts .prompt  import  PromptTemplate 
66
77from  ...base  import  ModelAdapter 
8- from  .. .registry  import  registry 
8+ from  genai_core .registry  import  registry 
99
1010
1111class  MistralInstructContentHandler (LLMContentHandler ):
Original file line number Diff line number Diff line change 55from  langchain .prompts .prompt  import  PromptTemplate 
66
77from  ...base  import  ModelAdapter 
8- from  .. .registry  import  registry 
8+ from  genai_core .registry  import  registry 
99
1010
1111class  MixtralInstructContentHandler (LLMContentHandler ):
Original file line number Diff line number Diff line change 1010from  aws_lambda_powertools .utilities .data_classes .sqs_event  import  SQSRecord 
1111from  aws_lambda_powertools .utilities .typing  import  LambdaContext 
1212
13+ import  adapters 
1314from  genai_core .utils .websocket  import  send_to_client 
1415from  genai_core .types  import  ChatbotAction 
1516
Original file line number Diff line number Diff line change @@ -328,9 +328,10 @@ export default function ChatInputPanel(props: ChatInputPanelProps) {
328328    const  value  =  state . value . trim ( ) ; 
329329    const  request : ChatBotRunRequest  =  { 
330330      action : ChatBotAction . Run , 
331-       modelInterface : props . configuration . files 
332-         ? "multimodal" 
333-         : ( state . selectedModelMetadata ! . interface  as  ModelInterface ) , 
331+       modelInterface :
332+         props . configuration . files  &&  props . configuration . files . length  >  0 
333+           ? "multimodal" 
334+           : ( state . selectedModelMetadata ! . interface  as  ModelInterface ) , 
334335      data : { 
335336        mode : ChatBotMode . Chain , 
336337        text : value , 
Original file line number Diff line number Diff line change 44  Container , 
55  ExpandableSection , 
66  Popover , 
7-   SpaceBetween , 
87  Spinner , 
98  StatusIndicator , 
109  Tabs , 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments