Skip to content

Commit

Permalink
Merge pull request #248 from polywrap/dev
Browse files Browse the repository at this point in the history
Dev Release April 10th
  • Loading branch information
dOrgJelli committed Apr 10, 2024
2 parents ebc9d7b + c0d9ca9 commit b760116
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
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

0 comments on commit b760116

Please sign in to comment.