Skip to content

Commit

Permalink
refactor prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
aeltorio committed Oct 4, 2024
1 parent 8e89d22 commit e500e3c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Please refer to the [PRIVACY.md](PRIVACY.md) file for information on data collec

## Contributing

We welcome contributions to the Groq Outlook Add-in! If you'd like to contribute, please follow these steps:
We welcome contributions to the AI Outlook Add-in! If you'd like to contribute, please follow these steps:

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
Expand All @@ -99,8 +99,8 @@ We welcome contributions to the Groq Outlook Add-in! If you'd like to contribute

## Support

If you encounter any issues or have questions about the Groq Outlook Add-in, please [open an issue](https://github.com/sctg-development/groq-outlook/issues) on our GitHub repository.
If you encounter any issues or have questions about the AI Outlook Add-in, please [open an issue](https://github.com/sctg-development/ai-outlook/issues) on our GitHub repository.

---

This project is not affiliated with or endorsed by Microsoft, Meta or Groq. It is an independent add-in developed to enhance the Outlook web experience using Groq's AI capabilities and Meta Llama models.
This project is not affiliated with or endorsed by Microsoft, Meta, SambaNova or Groq. It is an independent add-in developed to enhance the Outlook web experience using Groq's AI capabilities and Meta Llama models.
15 changes: 10 additions & 5 deletions src/aipane/components/HeroComboPrompts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
import * as React from "react";
import { Dropdown, Label, makeStyles, Option, useId } from "@fluentui/react-components";
import { useState, useEffect } from "react";
import config from "../../config.json"; // Assurez-vous que le chemin est correct
import type { AIPrompt } from "../AIPrompt";

import config from "../../config.json";
interface HeroComboPromptsProps {
onChange: (selectedValue: string) => void;
}
Expand All @@ -28,6 +27,8 @@ const useStyles = makeStyles({
},
});

const prompts = config.prompts;

const HeroComboPrompts: React.FC<HeroComboPromptsProps> = ({ onChange }) => {
const styles = useStyles();
const inputId = useId("input");
Expand All @@ -41,6 +42,10 @@ const HeroComboPrompts: React.FC<HeroComboPromptsProps> = ({ onChange }) => {
};

useEffect(() => {
// prompts.forEach((prompt: AIPrompt) => {
// console.log(prompt.summary);
// });

onChange(selectedValue);
}, [selectedValue]);

Expand All @@ -56,9 +61,9 @@ const HeroComboPrompts: React.FC<HeroComboPromptsProps> = ({ onChange }) => {
defaultSelectedOptions={[config.prompts[0].id]}
defaultValue={config.prompts[0].summary}
>
{config.prompts.map((option: AIPrompt) => (
<Option value={option.id} key={option.id}>
{option.summary}
{prompts.map((prompt: AIPrompt) => (
<Option value={prompt.id} key={prompt.id}>
{prompt.summary || prompt.system}
</Option>
))}
</Dropdown>
Expand Down

0 comments on commit e500e3c

Please sign in to comment.