Giter Site home page Giter Site logo

thinkly.ai-backend's Issues

Adjust top_p & temp depending on type of query

Adjusting the temperature and top_p parameters can change the output of the model in various ways. Here are some scenarios where you might want to alter them:

Temperature:
Creative Writing: If you're using the model for creative writing or brainstorming and you want diverse, unexpected responses, a higher temperature like 0.8 might be appropriate. This introduces more randomness in the outputs.
Technical Writing: If you're generating technical or professional content where consistency and focus are crucial, a lower temperature like 0.2 might be better. This makes the output more deterministic and focused.

Top_p (Nucleus Sampling):
High-Stakes Decision Making: If you're using the model to help with high-stakes decisions where accuracy is critical, a lower top_p value like 0.1 could be useful. This restricts the model's responses to the most probable tokens.
Exploratory Conversations: If you're having an exploratory conversation and want a good balance between diversity and relevance, a higher top_p value like 0.9 could be suitable. This allows the model to consider a broader range of token possibilities.

Remember that both parameters control the trade-off between diversity and determinism in the model's responses. They should be adjusted according to the specific requirements of your task. As the documentation suggests, it's generally recommended to adjust either temperature or top_p, not both, to avoid confusion and unexpected behavior.

Test AWS Chalice

Check to see how AWS chalice works then get the backend running with lambda.

Stream Responses

Stream the responses for specific prompts.

ie, when user is questioning notes + assignments.

Find other cases that would benefit from streaming.

Generate the whole curriculum at once

As of right now, fetching each unit independently is not working properly, so we need to be able to fetch the entire curriculum all at once.

Additionally, having the learning objectives, textbooks, prerequisites and course name and description are seeming to confuse gpt.

So make sure the function takes in only a user prompt.

Add chat streaming capability for GPT API.

There will be a section of the notes page where the user can ask questions regarding the notes.

For this feature we will need the chat streaming capability.

Here is the streaming documentation:
https://github.com/openai/openai-cookbook/blob/main/examples/How_to_stream_completions.ipynb

We will also need a socket set up using Socket.io python client. Here is the documentation:
https://python-socketio.readthedocs.io/en/latest/

  • Get the streaming capability working.
  • Get the socket working.
  • Get both working together.

Token Count for billing

We need to be able to count the amount the tokens each user uses.
We will push each usage to firestore.

  • Setup firestore on the backend
  • Add a function to push the usage to the db
  • For each backend call to GPT, we need to push the token count to the DB

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.