silva96 / ai_stories Goto Github PK
View Code? Open in Web Editor NEWAiStories - Generate Storybooks for your kids using Artificial Intelligence
License: MIT License
AiStories - Generate Storybooks for your kids using Artificial Intelligence
License: MIT License
We want to explore how are the stories generated using the new chatgpt api model
Here's the documentation of the new model
https://platform.openai.com/docs/guides/chat
It should be as easy as changing the usage of the old endpoint for the new one and configure parameters properly.
But first we need to update the open ai gem.
We are using this gem:
https://github.com/alexrudall/ruby-openai
Otherwise you wont be able to use the new endpoint.
Please make sure you update every usage of the gem to the new endpoint.
They are mostly used in the jobs (app/jobs directory)
Take as an example this:
@client.completions(
parameters: {
model: 'text-davinci-003',
prompt:, max_tokens: (DAVINCI_MAX_TOKENS - prompt.size)
}
)
That's using davinci 003
You need to update those calls to use gpt3.5-turbo
Please refer to the gem's documentation to do it accordingly.
You would also want to update the DAVINCI_MAX_TOKENS constant to 4096
The maximum number of tokens allowed for the generated answer. By default, the number of tokens the model can return will be (4096 - prompt tokens).
I am unable to connect to OpenAI when I enter my token without enclosing in quotations:
i.e. OPENAI_ACCESS_TOKEN=sk-randomcharacters
I have no issues connecting to OpenAI if I enter my token enclosed with quotes:
i.e. OPENAI_ACCESS_TOKEN="sk-randomcharacters"
Hi, I've done all the steps. I can also access the web ui, but after entering the prompt, it just keeps loading, any idea what should be done, please note I've also updated the open ai api.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.