Skip to content

Commit 8e812b8

Browse files
committed
feat: Integrate chat functionality and improve image analysis
- Added dotenv and react-native-config for environment variable management. - Refactored ChatScreen to handle chat logs and user input more effectively. - Implemented chat service to interact with Hugging Face's Llama-2 model for AI responses. - Updated image recognition service to utilize the Salesforce BLIP model for image captioning. - Enhanced error handling and response parsing in image analysis. - Improved UI components for better user experience in chat interactions.
1 parent 17d4545 commit 8e812b8

File tree

6 files changed

+2564
-583
lines changed

6 files changed

+2564
-583
lines changed

a.eyes/App.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,15 @@ export default function App() {
1212

1313
const navigate = (target, params = null) => {
1414
console.log(`Navigating to ${target}`, params);
15-
16-
// If going to Chat with params, update them
15+
1716
if (target === 'Chat' && params) {
1817
setChatParams(params);
19-
}
20-
// If going to any other screen from Chat, reset params
21-
else if (screen === 'Chat' && target !== 'Chat') {
18+
} else if (target === 'HistoryChat' && params) {
19+
setChatParams(params);
20+
} else if ((screen === 'Chat' || screen === 'HistoryChat') && target !== 'Chat' && target !== 'HistoryChat') {
2221
setChatParams(null);
2322
}
24-
23+
2524
setScreen(target);
2625
};
2726

@@ -39,7 +38,6 @@ export default function App() {
3938
{screen === 'Chat' && <ChatScreen navigate={navigate} chatParams={chatParams} />}
4039
{screen === 'History' && <HistoryScreen navigate={navigate} />}
4140
{screen === 'HistoryChat' && <HistoryChatScreen navigate={navigate} route={{ params: chatParams }} />}
42-
{screen === 'LiveChat' && <LiveChatScreen navigate={navigate} />}
4341
</SafeAreaView>
4442
);
4543
}

0 commit comments

Comments
 (0)