Skip to content

Commit

Permalink
chore(deps): update deps and run pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Avantol13 committed Feb 7, 2025
1 parent b838ea4 commit c4f6981
Show file tree
Hide file tree
Showing 15 changed files with 933 additions and 834 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ exclude_also =
if __name__ == .__main__.:

; Don't complain about abstract methods, they aren't run:
@(abc\.)?abstractmethod
@(abc\.)?abstractmethod
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ repos:
args: ['--baseline', '.secrets.baseline']
exclude: poetry.lock
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: no-commit-to-branch
args: [--branch, develop, --branch, master, --pattern, release/.*]
- repo: https://github.com/psf/black
rev: 22.6.0
rev: 25.1.0
hooks:
- id: black
1 change: 1 addition & 0 deletions bin/download_files_from_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
This dumps all the files into a `library` folder with the repo name
afterward and then the files themselves from each repo.
"""

import logging
import os
import time
Expand Down
2 changes: 1 addition & 1 deletion clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ echo ----------------------------------------------
echo Running pylint to detect lint
echo ----------------------------------------------
echo Command: pylint -vv "$SCRIPT_DIR/gen3discoveryai" --rcfile ~/.gen3/.github/linters/.python-lint
pylint -vv "$SCRIPT_DIR/gen3discoveryai" --rcfile ~/.gen3/.github/.github/linters/.python-lint
pylint -vv "$SCRIPT_DIR/gen3discoveryai" --rcfile ~/.gen3/.github/.github/linters/.python-lint
32 changes: 16 additions & 16 deletions docs/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ info:
title: Gen3 Discovery AI Service
description: |
# Overview
API for querying about specific pre-configured topics. A topic
has a configured chain of actions that eventually query an LLM and may
API for querying about specific pre-configured topics. A topic
has a configured chain of actions that eventually query an LLM and may
contain a knowledge store of documents related to the topic (which may be used to
include augmentation of the query).
At this time, the available configured chain(s) are based on a
[Retrieval Augmented Generation (RAG) architecture](https://arxiv.org/abs/2005.11401).
Queries will be augmented with relevant information from a
knowledge library for that topic. Upon receiving a query, additional information is
Queries will be augmented with relevant information from a
knowledge library for that topic. Upon receiving a query, additional information is
retrieved from the library, relevancy compared to
user query, and a prompt to a foundational AI LLM model is augmented with the
user query, and a prompt to a foundational AI LLM model is augmented with the
additional context from the knowledge library. The foundational model then generates a response.
In the future, more configured chains may enable alternative architectures or just
Expand Down Expand Up @@ -251,7 +251,7 @@ paths:
Example 1:
topics:
default:
description: default topic
description: default topic
topic_chain: TopicChainOpenAiQuestionAnswerRAG
system_prompt: 'You answer questions about a specific topic. You''ll be given
relevant context for that topic. You are acting as a search assistant for a
Expand All @@ -267,7 +267,7 @@ paths:
num_similar_docs_to_find: '4'
similarity_score_threshold: '0.5'
bdc:
description: Ask about available BDC datasets, powered by public dataset metadata like study descriptions
description: Ask about available BDC datasets, powered by public dataset metadata like study descriptions
topic_chain: TopicChainOpenAiQuestionAnswerRAG
system_prompt: You answer questions about datasets that are available in BioData
Catalyst. You'll be given relevant dataset descriptions for every dataset that's
Expand All @@ -281,7 +281,7 @@ paths:
num_similar_docs_to_find: '4'
similarity_score_threshold: '0.5'
heal:
description: Ask about available datasets, powered by public dataset metadata like study descriptions
description: Ask about available datasets, powered by public dataset metadata like study descriptions
topic_chain: TopicChainOpenAiQuestionAnswerRAG
system_prompt: You answer questions about datasets that are available in NIH's
Helping to End Addiction Long-term Initiative, or HEAL Initiative data platform.
Expand All @@ -300,7 +300,7 @@ paths:
topic_chain: TopicChainOpenAiQuestionAnswerRAG
system_prompt: |
You answer questions about the Gen3 codebase.
You'll be given relevant markdown files from the codebase.
You'll be given relevant markdown files from the codebase.
metadata:
model_name: gpt-3.5-turbo
model_temperature: '0.33'
Expand All @@ -311,7 +311,7 @@ paths:
value:
topics:
default:
description: default topic
description: default topic
topic_chain: TopicChainOpenAiQuestionAnswerRAG
system_prompt: 'You answer questions about a specific topic. You''ll be given
relevant context for that topic. You are acting as a search assistant for a
Expand All @@ -327,7 +327,7 @@ paths:
num_similar_docs_to_find: '4'
similarity_score_threshold: '0.5'
bdc:
description: Ask about available BDC datasets, powered by public dataset metadata like study descriptions
description: Ask about available BDC datasets, powered by public dataset metadata like study descriptions
topic_chain: TopicChainOpenAiQuestionAnswerRAG
system_prompt: You answer questions about datasets that are available in BioData
Catalyst. You'll be given relevant dataset descriptions for every dataset that's
Expand All @@ -341,7 +341,7 @@ paths:
num_similar_docs_to_find: '4'
similarity_score_threshold: '0.5'
heal:
description: Ask about available datasets, powered by public dataset metadata like study descriptions
description: Ask about available datasets, powered by public dataset metadata like study descriptions
topic_chain: TopicChainOpenAiQuestionAnswerRAG
system_prompt: You answer questions about datasets that are available in NIH's
Helping to End Addiction Long-term Initiative, or HEAL Initiative data platform.
Expand All @@ -360,7 +360,7 @@ paths:
topic_chain: TopicChainOpenAiQuestionAnswerRAG
system_prompt: |
You answer questions about the Gen3 codebase.
You'll be given relevant markdown files from the codebase.
You'll be given relevant markdown files from the codebase.
metadata:
model_name: gpt-3.5-turbo
model_temperature: '0.33'
Expand Down Expand Up @@ -450,7 +450,7 @@ paths:
Example 1:
topics:
bdc:
description: Ask about available BDC datasets, powered by public dataset metadata like study descriptions
description: Ask about available BDC datasets, powered by public dataset metadata like study descriptions
topic_chain: TopicChainOpenAiQuestionAnswerRAG
system_prompt: You answer questions about datasets that are available in BioData
Catalyst. You'll be given relevant dataset descriptions for every dataset that's
Expand All @@ -468,7 +468,7 @@ paths:
value:
topics:
bdc:
description: Ask about available BDC datasets, powered by public dataset metadata like study descriptions
description: Ask about available BDC datasets, powered by public dataset metadata like study descriptions
topic_chain: TopicChainOpenAiQuestionAnswerRAG
system_prompt: You answer questions about datasets that are available in BioData
Catalyst. You'll be given relevant dataset descriptions for every dataset that's
Expand Down
1 change: 1 addition & 0 deletions gen3discoveryai/topic_chains/question_answer_google.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
based on the previous relevancy search
5. Send augmented prompt to the foundational model
"""

from __future__ import annotations

from typing import Any, Dict
Expand Down
1 change: 1 addition & 0 deletions gen3discoveryai/topic_chains/question_answer_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
based on the previous relevancy search
5. Send augmented prompt to the foundational model
"""

from __future__ import annotations

from typing import Any, Dict
Expand Down
Loading

0 comments on commit c4f6981

Please sign in to comment.