mem0 icon indicating copy to clipboard operation
mem0 copied to clipboard

Feature Request: Parameters and OpenAI model

Open forgingdestiny opened this issue 1 year ago • 2 comments

Parameters to specify OpenAI model and settings.

ex. I'm subclassing App and updating the model this way to test:

def get_openai_answer(self, prompt):
        messages = []
        messages.append({
            "role": "user", "content": prompt
        })
        response = openai.ChatCompletion.create(
            model="gpt-4-0613",
            messages=messages,
            temperature=0.25,
            max_tokens=1000,
            top_p=1,
        )
        return response["choices"][0]["message"]["content"]

It would be awesome to have a few parameters when querying for temperature,max_tokens, and top_p as well. Or globally/in env? not sure what's best, but happy to create a PR.

forgingdestiny avatar Jun 21 '23 20:06 forgingdestiny

I agree. I think that to the greatest extent possible, all important parameters including prompts should be exposed to the user so they can change them at any time.

To further illustrate: I think that Solara would be an ideal browser-based front-end for this app. The app could start with default values, but then the user would have flexibility to change them at any time according to their needs. I would be more than happy to help with this.

joshuasundance-swca avatar Jun 22 '23 06:06 joshuasundance-swca

I opened a PR regarding this topic

josebenitezg avatar Jul 05 '23 01:07 josebenitezg

This feature made it to production, #215.

cachho avatar Jul 17 '23 15:07 cachho