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

Refactor AI Assistant code #9

Merged
merged 2 commits into from
Aug 1, 2024
Merged

Refactor AI Assistant code #9

merged 2 commits into from
Aug 1, 2024

Conversation

williamcotton
Copy link
Owner

@williamcotton williamcotton commented Aug 1, 2024

Related to #8

Refactor AiAssistants.run to return ChatCompletionMessageParam[] instead of modifying updatedChatHistory directly.

  • src/AiAssistants.ts
    • Modify AiAssistants.run to return a ChatCompletionMessageParam[].
    • Update the function signature and implementation to reflect the return type.
  • src/ai-assistants/postgresAssistant.ts
    • Modify postgresAssistant to return a ChatCompletionMessageParam[].
    • Update the function signature and implementation to reflect the return type.
  • src/useAIAssistant.ts
    • Update the call to AiAssistants.run to use the returned chat history.
    • Adjust the function implementation to handle the returned chat history.
  • src/ai-assistants/postgresAssistant.test.ts
    • Update tests to reflect the changes in postgresAssistant.
    • Adjust the test cases to handle the returned chat history.

For more details, open the Copilot Workspace session.

Related to #8

Refactor `AiAssistants.run` to return `ChatCompletionMessageParam[]` instead of modifying `updatedChatHistory` directly.

* **src/AiAssistants.ts**
  - Modify `AiAssistants.run` to return a `ChatCompletionMessageParam[]`.
  - Update the function signature and implementation to reflect the return type.
* **src/ai-assistants/postgresAssistant.ts**
  - Modify `postgresAssistant` to return a `ChatCompletionMessageParam[]`.
  - Update the function signature and implementation to reflect the return type.
* **src/useAIAssistant.ts**
  - Update the call to `AiAssistants.run` to use the returned chat history.
  - Adjust the function implementation to handle the returned chat history.
* **src/ai-assistants/postgresAssistant.test.ts**
  - Update tests to reflect the changes in `postgresAssistant`.
  - Adjust the test cases to handle the returned chat history.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/williamcotton/guish/issues/8?shareId=XXXX-XXXX-XXXX-XXXX).
@williamcotton williamcotton merged commit 27c924b into main Aug 1, 2024
2 checks passed
@williamcotton williamcotton deleted the refactor-ai-assistant branch August 1, 2024 00:34
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.

1 participant