mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2026-01-12 06:15:43 +00:00
Compare commits
4 Commits
3b8d8be676
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7b020e5bb | ||
|
|
d95ff9ccdd | ||
|
|
8347b798f3 | ||
|
|
a16472bcf3 |
@@ -240,6 +240,7 @@ Perplexica runs on Next.js and handles all API requests. It works right away on
|
||||
## Upcoming Features
|
||||
|
||||
- [ ] Adding more widgets, integrations, search sources
|
||||
- [ ] Adding ability to create custom agents (name T.B.D.)
|
||||
- [ ] Adding authentication
|
||||
|
||||
## Support Us
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
export const getSuggestions = async (chatHistory: [string, string][]) => {
|
||||
const chatTurns = chatHistory.map(([role, content]) => {
|
||||
if (role === 'human') {
|
||||
return { role: 'user', content };
|
||||
} else {
|
||||
return { role: 'assistant', content };
|
||||
}
|
||||
});
|
||||
|
||||
const chatModel = localStorage.getItem('chatModelKey');
|
||||
const chatModelProvider = localStorage.getItem('chatModelProviderId');
|
||||
|
||||
@@ -16,7 +8,7 @@ export const getSuggestions = async (chatHistory: [string, string][]) => {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
chatHistory: chatTurns,
|
||||
chatHistory,
|
||||
chatModel: {
|
||||
providerId: chatModelProvider,
|
||||
key: chatModel,
|
||||
|
||||
@@ -3,7 +3,6 @@ import { suggestionGeneratorPrompt } from '@/lib/prompts/suggestions';
|
||||
import { ChatTurnMessage } from '@/lib/types';
|
||||
import z from 'zod';
|
||||
import BaseLLM from '@/lib/models/base/llm';
|
||||
import { i } from 'mathjs';
|
||||
|
||||
type SuggestionGeneratorInput = {
|
||||
chatHistory: ChatTurnMessage[];
|
||||
|
||||
Reference in New Issue
Block a user