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

Feuture/rest client #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Feuture/rest client #2

wants to merge 2 commits into from

Conversation

notmhmd
Copy link

@notmhmd notmhmd commented Aug 15, 2024

added a rest client to consume test generator and added a code review utility

@notmhmd notmhmd requested a review from Joetib August 15, 2024 20:50
Copy link
Contributor

@Joetib Joetib left a comment

Choose a reason for hiding this comment

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

One last thing, does the rest api here respond to GitHub webhooks?
If not consider adding that. Gidgethub has a router module to respond to webhooks

system_message = SystemMessage(content=SYSTEM_MESSAGE_STR)

# Generate the review using OpenAI
chain = ChatOpenAI(model="gpt-4-1106-preview", temperature=0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefer using gpt-4o now to lower cost

# Generate the review using OpenAI
chain = ChatOpenAI(model="gpt-4-1106-preview", temperature=0)
messages = [system_message, human_message]
review_content = chain.invoke(messages).content
Copy link
Contributor

Choose a reason for hiding this comment

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

Invoke the chain asynchronously since you are in an async environment

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.

2 participants