Skip to content

Add FAQGen gateway in core to support FAQGen Example, Adds FAQGen LLM service#318

Merged
chensuyue merged 11 commits intoopea-project:mainfrom
yogeshmpandey:yogesh/feat/faqgen
Jul 23, 2024
Merged

Add FAQGen gateway in core to support FAQGen Example, Adds FAQGen LLM service#318
chensuyue merged 11 commits intoopea-project:mainfrom
yogeshmpandey:yogesh/feat/faqgen

Conversation

@yogeshmpandey
Copy link
Copy Markdown
Collaborator

Description

Added components to support FAQGen Example.

  • FAQGen Gateway
  • FAQGen LLM Endpoint

Issues

List the issue or RFC link this PR is working on. If there is no such link, please mark it as n/a.

n/a

List the type of change like below. Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would break existing design and interface)

Dependencies

List the newly introduced 3rd party dependency if exists.

Tests

Added tests to the tests folder.

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 17, 2024

Codecov Report

Attention: Patch coverage is 20.00000% with 16 lines in your changes missing coverage. Please review.

Files Coverage Δ
comps/cores/mega/constants.py 98.14% <100.00%> (+0.03%) ⬆️
comps/cores/mega/gateway.py 25.49% <15.78%> (-1.00%) ⬇️

... and 1 file with indirect coverage changes

yogeshmpandey and others added 5 commits July 17, 2024 16:26
Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>
Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>
Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>
@chensuyue chensuyue added this to the v0.8 milestone Jul 18, 2024
@Spycsh
Copy link
Copy Markdown
Collaborator

Spycsh commented Jul 19, 2024

Hi @yogeshmpandey , thanks for contribution. This microservice works perfectly. Please check the comments in the gateway.py and make sure the example also works with the latest code.

@hshen14 hshen14 requested review from ftian1 and lkk12014402 July 22, 2024 02:16
@ftian1
Copy link
Copy Markdown
Collaborator

ftian1 commented Jul 22, 2024

I am thinking if it's needed to introduce a new FAQGen type under comps/llm folder. the most of code is same with the one in comps/llm/summarization, just prompt_template is different, right? maybe a more appropriate way is to have a unique code with an extra template folder in which it contains many different templates to allow user to setup when starting the LLM docker.

@yogeshmpandey
Copy link
Copy Markdown
Collaborator Author

yogeshmpandey commented Jul 22, 2024

I am thinking if it's needed to introduce a new FAQGen type under comps/llm folder. the most of code is same with the one in comps/llm/summarization, just prompt_template is different, right? maybe a more appropriate way is to have a unique code with an extra template folder in which it contains many different templates to allow user to setup when starting the LLM docker.

Hi @ftian1

I did not want to introduce any breaking change to other components hence added a new LLM endpoint,

I agree with this approach, the user can choose the specific prompt template defined by the environment variable. These templates can be read from a template file.

Option - 2
Another approach could be to allow users to provide a custom prompt. We can update the ChatCompletionRequest with an Optional custom_prompt field, enabling users to set their desired prompt. With this approach, the same backend can handle multiple tasks like summarization, FAQs, meeting summaries, etc. Additionally, this would provide an option for users to override the default custom prompt for summarization tasks.

Copy link
Copy Markdown
Collaborator

@ftian1 ftian1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge it at first. we will unify the whole LLM instances together in the next release.

PS:we would implement option 1 and 2 together. so either there is a default system prompt when the service is running, or user can override it during generation with user's query.

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>
@chensuyue chensuyue merged commit 9c90ebf into opea-project:main Jul 23, 2024
dwhitena pushed a commit to predictionguard/GenAIComps that referenced this pull request Jul 24, 2024
… service (opea-project#318)

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>
Co-authored-by: Sihan Chen <39623753+Spycsh@users.noreply.github.com>
Signed-off-by: Daniel Whitenack <whitenack.daniel@gmail.com>
berkecanrizai pushed a commit to berkecanrizai/GenAIComps that referenced this pull request Jul 29, 2024
… service (opea-project#318)

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>
Co-authored-by: Sihan Chen <39623753+Spycsh@users.noreply.github.com>
Signed-off-by: Berke <berkecanrizai1@gmail.com>
berkecanrizai pushed a commit to berkecanrizai/GenAIComps that referenced this pull request Jul 29, 2024
… service (opea-project#318)

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>
Co-authored-by: Sihan Chen <39623753+Spycsh@users.noreply.github.com>
Signed-off-by: Berke <berkecanrizai1@gmail.com>
berkecanrizai pushed a commit to berkecanrizai/GenAIComps that referenced this pull request Jul 29, 2024
… service (opea-project#318)

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>
Co-authored-by: Sihan Chen <39623753+Spycsh@users.noreply.github.com>
Signed-off-by: Berke <berkecanrizai1@gmail.com>
sharanshirodkar7 pushed a commit to predictionguard/pg-GenAIComps that referenced this pull request Aug 7, 2024
… service (opea-project#318)

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>
Co-authored-by: Sihan Chen <39623753+Spycsh@users.noreply.github.com>
Signed-off-by: sharanshirodkar7 <ssharanshirodkar7@gmail.com>
lkk12014402 pushed a commit that referenced this pull request Aug 8, 2024
Signed-off-by: chensuyue <suyue.chen@intel.com>
madison-evans pushed a commit to SAPD-Intel/GenAIComps that referenced this pull request May 12, 2025
… service (opea-project#318)

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>
Co-authored-by: Sihan Chen <39623753+Spycsh@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants