-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
00611ef
commit 50c1f6c
Showing
6 changed files
with
58 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# for asking general questions directly to gpt4 | ||
|
||
from typing import List | ||
|
||
from copilot.context import Context | ||
from copilot.conversation import Conversation | ||
from copilot.open_ai_adapter import stream_cmd_into_terminal, request_cmds | ||
|
||
|
||
def ask_question(context: Context, question: List[str]) -> None: | ||
prompt = " ".join(question) | ||
|
||
messages = [] | ||
messages.append({"role": "system", "content": "You are an AI Copilot operating in a terminal. You are a general assistant to the user."}) | ||
messages.append({"role": "user", "content": prompt}) | ||
conversation = Conversation( | ||
messages=messages, | ||
model=context.model | ||
) | ||
|
||
response = stream_cmd_into_terminal(conversation) | ||
print(response) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
|
||
setup( | ||
name ='terminal-copilot', | ||
version ='1.3.3', | ||
version ='1.4.0', | ||
author ='Methexis', | ||
author_email ='[email protected]', | ||
url ='https://github.com/Methexis-Inc/terminal-copilot', | ||
|