Skip to content

Instantly share code, notes, and snippets.

@ljnmedium
Created September 29, 2023 07:39
Show Gist options
  • Save ljnmedium/ab85deb452803d70ee79a0899177ab29 to your computer and use it in GitHub Desktop.
Save ljnmedium/ab85deb452803d70ee79a0899177ab29 to your computer and use it in GitHub Desktop.
model_inforetrieval.py
chatdoc = ChatDoc(model_name= OPENAI_MODEL)
chatdoc.connect_openai_api()
questions = QUESTIONS_COMMITTE_AUDIT
retriever.retreive_with_query( query, top_k=1, namespace='Eiffage')
contexts = loader_document.retreive_contents_from_ids(ids)
respone = chatdoc.prompt_with_context(query, contexts= list(contexts.values()), verbose=True)
print(query,'\n', respone, '\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment