Comments (4)
Hi! Thanks for raising the issue. I've never worked with proxies in libraries, but I do understand the need for them in different situations.
I'll look into what can be done about this!
from gpt-turbo.
There seem to be a related issue on OpenAI's Node API with a potential fix through configuring the axios instance. I'll try to implement some config options to the Conversation object to do this. However, I'm unsure how to test this locally, but I'll try to figure something out!
from gpt-turbo.
Another related issue is openai/openai-node#92.
This solution can resolve this issue, hope it can help
from gpt-turbo.
Hey! Sorry it took me a while to ship this, I was working on the message streaming feature at the time the issue was raised. Thanks for your patience!
I implemented a way to pass an AxiosRequestConfig
object to both the Conversation
constructor and its prompt
method.
This is available on version 2.1.0
.
import { Conversation } from 'gpt-turbo';
(async () => {
const conversation = new Conversation(
{
apiKey: /* Your OpenAI API key */,
},
{
proxy: {
protocol: /* Your proxy protocol */,
host: /* Your proxy host */,
port: /* Your proxy port */,
auth: {
username: /* Your proxy username */,
password: /* Your proxy password */,
},
}
}
);
const response = await conversation.prompt(
"What is TypeScript?",
{},
{
proxy: {
protocol: /* Your proxy protocol */,
host: /* Your proxy host */,
port: /* Your proxy port */,
auth: {
username: /* Your proxy username */,
password: /* Your proxy password */,
},
}
}
);
console.log(`Response: ${response.content}`);
})();
Let me know if you have any questions or other issues regarding the proxy. I haven't been able to test it, since I've never used such features, but it should work since there's no implementation on gpt-turbo apart from passing your options straight to OpenAI's SDK. Thanks again for your issue!
from gpt-turbo.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpt-turbo.