Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release April 10th #249

Merged
merged 3 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def generate_keywords(project_descriptions: list[str]) -> list[list[str]]:
keywords_prompt = ChatPromptTemplate.from_messages([
("system", keywords_prompt_template),
])
llm = ChatOpenAI(model="gpt-4-1106-preview") # type: ignore
llm = ChatOpenAI(model="gpt-4-turbo") # type: ignore

keywords_chain = keywords_prompt | llm | StrOutputParser()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def generate_queries(prompt: str, n) -> list[str]:
queries_prompt = ChatPromptTemplate.from_messages([
("system", queries_prompt_template),
])
llm = ChatOpenAI(model="gpt-4-1106-preview") # type: ignore
llm = ChatOpenAI(model="gpt-4-turbo") # type: ignore

queries_chain = queries_prompt | llm | CommaSeparatedListOutputParser()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def rerank_top_projects(prompt: str, projects: list[Projects]) -> list[Projects]
formatted_prompt = reranking_prompt_template.format(prompt=prompt, separator=separator, projects=formatted_projects)

response = openai.chat.completions.create(
model="gpt-4-1106-preview",
model="gpt-4-turbo",
response_format={"type": "json_object"},
messages=[
{"role": "user", "content": formatted_prompt}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def score_projects_impact_funding(projects_with_report: list[Projects]) -> list[
("system", score_projects_prompt_template),
])

llm = ChatOpenAI(model="gpt-4-1106-preview", temperature=0, model_kwargs={'seed': 10}) # type: ignore
llm = ChatOpenAI(model="gpt-4-turbo", temperature=0, model_kwargs={'seed': 10}) # type: ignore

scoring_chain = score_projects_prompt | llm | JsonOutputParser()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def score_projects_relevancy(projects_with_report: list[tuple[Projects, str]], p
("system", score_projects_relevancy_prompt_template),
])

llm = ChatOpenAI(model="gpt-4-1106-preview", temperature=0, model_kwargs={'seed': 10}) # type: ignore
llm = ChatOpenAI(model="gpt-4-turbo", temperature=0, model_kwargs={'seed': 10}) # type: ignore

scoring_chain = score_projects_relevancy_prompt | llm | JsonOutputParser()

Expand Down
Loading