diff --git a/chatapi/README.md b/chatapi/README.md
index f0e03039d1..e179b40ee6 100644
--- a/chatapi/README.md
+++ b/chatapi/README.md
@@ -1,23 +1,12 @@
## Couchdb Notes
-Ensure you have set the following configs in the `configurations` database in couchdb:
+Ensure you have set the chatapi configs via the manager -> AI Configurations or in the `configurations` database in couchdb:
+
+For model choices view:
+ Openai: https://platform.openai.com/docs/models
+ Perplexity: https://docs.perplexity.ai/guides/model-cards
+ Gemini: https://deepmind.google/technologies/gemini/
- ```
- "keys": {
- "openai": "sk-mm",
- "perplexity": "pplx-21",
- "gemini": "AIza"
- },
- "models": {
- "openai": "gpt-3.5-turbo",
- "perplexity": "llama-3-sonar-small-32k-online",
- "gemini": "gemini-pro"
- },
- "assistant": {
- "name": "Planet Context",
- "instructions": "You are a brainstorming manager for Open Learning Exchange (OLE) - https://ole.org/, you have specialised knowledge in Planet(web app) and myPlanet(mobile app) applications developed by OLE. You are designed to generate innovative ideas and provide suggestions and help the community members so as to ensure OLE's mission of empowering communities. Emphasize on terms like 'learning,' 'learner,' 'coach,' 'leader,' 'community,' 'power,' 'team,' and 'enterprises,' and avoids overly technical jargon. You are to embody OLE's ethos of self-reliance, mentoring, and community leadership, steering clear of concepts that contradict these values. Communicates in a formal tone, treating users with respect and professionalism, and maintaining a supportive, solution-oriented approach. Ask for clarifications when necessary to ensure contributions are accurate and relevant, and always encourages community-focused, empowering brainstorming."
- }
- ```
Note: This applies for both production and development environments.
@@ -80,7 +69,7 @@ In the production environment these configs are set in the `planet.yml` file.
- **context**: string(optional) -> The text context you would like to pre-load the AI Assistant with
- **aiProvider**: Object(required)
- **name**: string(required) -> Name of the API provider to choose from i.e openai, perplexity or gemini.
- - **model**: string(optional) -> Name of the specific provider model to use. Defaults to gpt-3.5-turbo for _openai_, llama-3-sonar-small-32k-online for _peplexity_ and gemini-pro for _google gemini_
+ - **model**: string(optional) -> Name of the specific provider model to use.
- **_id**: couchdb document id
- **_rev**: couchdb revision id
The couchdb id and rev are optional fields(only optional when starting a new chat), however to update an existing chat the id and rev (required) be provided.
diff --git a/chatapi/src/config/ai-providers.config.ts b/chatapi/src/config/ai-providers.config.ts
index 1263236a66..d1c4d3a032 100644
--- a/chatapi/src/config/ai-providers.config.ts
+++ b/chatapi/src/config/ai-providers.config.ts
@@ -42,9 +42,9 @@ const initialize = async () => {
};
models = {
- 'openai': { 'ai': keys.openai, 'defaultModel': doc?.models.openai || 'gpt-3.5-turbo' },
- 'perplexity': { 'ai': keys.perplexity, 'defaultModel': doc?.models.perplexity || 'llama-3-sonar-small-32k-online' },
- 'gemini': { 'ai': keys.gemini, 'defaultModel': doc?.models.gemini || 'gemini-pro' },
+ 'openai': { 'ai': keys.openai, 'defaultModel': doc?.models.openai || '' },
+ 'perplexity': { 'ai': keys.perplexity, 'defaultModel': doc?.models.perplexity || '' },
+ 'gemini': { 'ai': keys.gemini, 'defaultModel': doc?.models.gemini || '' },
};
assistant = {
diff --git a/chatapi/src/utils/chat-helpers.utils.ts b/chatapi/src/utils/chat-helpers.utils.ts
index a146c063af..8f6eb33517 100644
--- a/chatapi/src/utils/chat-helpers.utils.ts
+++ b/chatapi/src/utils/chat-helpers.utils.ts
@@ -155,7 +155,7 @@ export async function aiChatNonStream(
return await retrieveResponse(thread.id);
} catch (error) {
- return `Error processing request ${error}`;
+ throw new Error(`Error processing request ${error}`);
}
}
diff --git a/src/app/community/community.component.html b/src/app/community/community.component.html
index 4af70052ae..e2ad9dfb2c 100644
--- a/src/app/community/community.component.html
+++ b/src/app/community/community.component.html
@@ -8,7 +8,12 @@