Skip to content

Add Support for File Attachments in Chat Completion Messages #1053

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/FUNDING.yml

This file was deleted.

16 changes: 8 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: ""
labels: bug
assignees: ''

assignees: ""
---

Your issue may already be reported!
Please search on the [issue tracker](https://github.com/sashabaranov/go-openai/issues) before creating one.
Please search on the [issue tracker](https://github.com/incard/go-openai/issues) before creating one.

**Describe the bug**
A clear and concise description of what the bug is. If it's an API-related bug, please provide relevant endpoint(s).
Expand All @@ -23,10 +22,11 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem. For non-graphical issues, please provide any relevant logs or stack traces.

**Environment (please complete the following information):**
- go-openai version: [e.g. v1.12.0]
- Go version: [e.g. 1.18]
- OpenAI API version: [e.g. v1]
- OS: [e.g. Ubuntu 20.04]

- go-openai version: [e.g. v1.12.0]
- Go version: [e.g. 1.18]
- OpenAI API version: [e.g. v1]
- OS: [e.g. Ubuntu 20.04]

**Additional context**
Add any other context about the problem here.
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
title: ""
labels: enhancement
assignees: ''

assignees: ""
---

Your issue may already be reported!
Please search on the [issue tracker](https://github.com/sashabaranov/go-openai/issues) before creating one.
Please search on the [issue tracker](https://github.com/incard/go-openai/issues) before creating one.

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
A similar PR may already be submitted!
Please search among the [Pull request](https://github.com/sashabaranov/go-openai/pulls) before creating one.
Please search among the [Pull request](https://github.com/incard/go-openai/pulls) before creating one.

If your changes introduce breaking changes, please prefix the title of your pull request with "[BREAKING_CHANGES]". This allows for clear identification of such changes in the 'What's Changed' section on the release page, making it developer-friendly.

Expand Down
28 changes: 21 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
# Contributing Guidelines

## Overview
Thank you for your interest in contributing to the "Go OpenAI" project! By following this guideline, we hope to ensure that your contributions are made smoothly and efficiently. The Go OpenAI project is licensed under the [Apache 2.0 License](https://github.com/sashabaranov/go-openai/blob/master/LICENSE), and we welcome contributions through GitHub pull requests.

Thank you for your interest in contributing to the "Go OpenAI" project! By following this guideline, we hope to ensure that your contributions are made smoothly and efficiently. The Go OpenAI project is licensed under the [Apache 2.0 License](https://github.com/incard/go-openai/blob/master/LICENSE), and we welcome contributions through GitHub pull requests.

## Reporting Bugs
If you discover a bug, first check the [GitHub Issues page](https://github.com/sashabaranov/go-openai/issues) to see if the issue has already been reported. If you're reporting a new issue, please use the "Bug report" template and provide detailed information about the problem, including steps to reproduce it.

If you discover a bug, first check the [GitHub Issues page](https://github.com/incard/go-openai/issues) to see if the issue has already been reported. If you're reporting a new issue, please use the "Bug report" template and provide detailed information about the problem, including steps to reproduce it.

## Suggesting Features
If you want to suggest a new feature or improvement, first check the [GitHub Issues page](https://github.com/sashabaranov/go-openai/issues) to ensure a similar suggestion hasn't already been made. Use the "Feature request" template to provide a detailed description of your suggestion.

If you want to suggest a new feature or improvement, first check the [GitHub Issues page](https://github.com/incard/go-openai/issues) to ensure a similar suggestion hasn't already been made. Use the "Feature request" template to provide a detailed description of your suggestion.

## Reporting Vulnerabilities
If you identify a security concern, please use the "Report a security vulnerability" template on the [GitHub Issues page](https://github.com/sashabaranov/go-openai/issues) to share the details. This report will only be viewable to repository maintainers. You will be credited if the advisory is published.

If you identify a security concern, please use the "Report a security vulnerability" template on the [GitHub Issues page](https://github.com/incard/go-openai/issues) to share the details. This report will only be viewable to repository maintainers. You will be credited if the advisory is published.

## Questions for Users
If you have questions, please utilize [StackOverflow](https://stackoverflow.com/) or the [GitHub Discussions page](https://github.com/sashabaranov/go-openai/discussions).

If you have questions, please utilize [StackOverflow](https://stackoverflow.com/) or the [GitHub Discussions page](https://github.com/incard/go-openai/discussions).

## Contributing Code
There might already be a similar pull requests submitted! Please search for [pull requests](https://github.com/sashabaranov/go-openai/pulls) before creating one.

There might already be a similar pull requests submitted! Please search for [pull requests](https://github.com/incard/go-openai/pulls) before creating one.

### Requirements for Merging a Pull Request

Expand All @@ -33,6 +39,7 @@ The requirements to accept a pull request are as follows:
The merging method for pull requests in this repository is squash merge.

### Creating a Pull Request

- Fork the repository.
- Create a new branch and commit your changes.
- Push that branch to GitHub.
Expand All @@ -42,9 +49,11 @@ The merging method for pull requests in this repository is squash merge.
If your changes introduce breaking changes, please prefix your pull request title with "[BREAKING_CHANGES]".

### Code Style

In this project, we adhere to the standard coding style of Go. Your code should maintain consistency with the rest of the codebase. To achieve this, please format your code using tools like `goimports` and resolve any syntax or style issues with `golangci-lint`.

**Run goimports:**

```
go install golang.org/x/tools/cmd/goimports@latest
```
Expand All @@ -54,6 +63,7 @@ goimports -w .
```

**Run golangci-lint:**

```
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
```
Expand All @@ -63,20 +73,24 @@ golangci-lint run --out-format=github-actions
```

### Unit Test

Please create or update tests relevant to your changes. Ensure all tests run successfully to verify that your modifications do not adversely affect other functionalities.

**Run test:**

```
go test -v ./...
```

### Integration Test
Integration tests are requested against the production version of the OpenAI API. These tests will verify that the library is properly coded against the actual behavior of the API, and will fail upon any incompatible change in the API.

Integration tests are requested against the production version of the OpenAI API. These tests will verify that the library is properly coded against the actual behavior of the API, and will fail upon any incompatible change in the API.

**Notes:**
These tests send real network traffic to the OpenAI API and may reach rate limits. Temporary network problems may also cause the test to fail.

**Run integration test:**

```
OPENAI_TOKEN=XXX go test -v -tags=integration ./api_integration_test.go
```
Expand Down
Loading
Loading