Home Software 01 Github 02 Colabs 03 Shell Basics 04 Apis 05 Webscraping 06 Nbdev 07 Javascript Packag... 08 Cloud Functions 09 Browser Extension Css Css Animations Javascript Llm Paradigms Protocols Websites

Don't Look! I'm changing!

URL Copied

https://github.com/ray-project/llm-numbers
 https://github.com/mshumer/gpt-prompt-engineer
 
 https://js.langchain.com/docs/modules/data_connection/retrievers/how_to/self_query/

https://www.intercom.com/

https://github.com/ShumzZzZz/GPT-Rambling/blob/main/LangChain%20Specific/langchain_persist_conversation_memory.ipynb

from langchain.schema import messages_from_dict, messages_to_dict extracted_messages = original_chain.memory.chat_memory.messages

[HumanMessage(content='what do you know about Python in less than 10 words', additional_kwargs={}),
  AIMessage(content='Python is a high-level programming language.', additional_kwargs={})]

ingest_to_db = messages_to_dict(extracted_messages)

[{'type': 'human',
   'data': {'content': 'what do you know about Python in less than 10 words',
    'additional_kwargs': {}}},
  {'type': 'ai',
   'data': {'content': 'Python is a high-level programming language.',
    'additional_kwargs': {}}}]

retrieve_from_db = json.loads(json.dumps(ingest_to_db))

retrieved_messages = messages_from_dict(retrieve_from_db)

retrieved_chat_history = ChatMessageHistory(messages=retrieved_messages)

retrieved_memory = ConversationBufferMemory(chat_memory=retrieved_chat_history)

reloaded_chain = ConversationChain( llm=llm, verbose=True, memory=retrieved_memory ) reloaded_chain.run('what about Javascript and Ruby')