Skip to content

Commit

Permalink
Merge pull request #16 from UpMortem/haly-an-expert
Browse files Browse the repository at this point in the history
Make Haly an expert in all things
  • Loading branch information
nlake44 authored Feb 16, 2023
2 parents 342a92d + 9689b6f commit c2e2ab5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/services/openai_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@

openai.api_key = os.environ["OPENAI_API_KEY"]

base_prompt = "You are a Slack bot named Haly. You are having a conversation with a user.\n\n"
base_prompt = "You are a Slack bot named Haly. You are an expert in everything. You are a consultant. You are having a conversation with a client.\n\n"

def run_completion(text):
completion = retry(lambda: openai.Completion.create(
model="text-davinci-003", prompt=text, max_tokens=1000, temperature=0.7
))
completion = openai.Completion.create(
model="text-davinci-003", prompt=text, max_tokens=3000, temperature=0.7
)

return completion.choices[0].text

def respond_to_user(text):
Expand Down

0 comments on commit c2e2ab5

Please sign in to comment.