cohere-ai / notebooks Goto Github PK
View Code? Open in Web Editor NEWCode examples and jupyter notebooks for the Cohere Platform
Code examples and jupyter notebooks for the Cohere Platform
I trying to create embeddings of CSV file of size around 137 MB which has both numerical and text column (total of 6). using the following code
from langchain.document_loaders.csv_loader import CSVLoader loader = CSVLoader(file_path=path, encoding="utf-8") data = loader.load() embeddings = CohereEmbeddings(model="multilingual-22-12", cohere_api_key= cohere_api_key) doc_result = embeddings.embed_documents([data])
above gives the following error
`TypeError Traceback (most recent call last)
in <cell line: 1>()
----> 1 doc_result = embeddings.embed_documents([data])
15 frames
/usr/lib/python3.9/json/encoder.py in default(self, o)
177
178 """
--> 179 raise TypeError(f'Object of type {o.class.name} '
180 f'is not JSON serializable')
181
TypeError: Object of type Document is not JSON serializable`
I tried a lot to figuring out the solution but seems like it hard. Please help me in this regard, I will be very thankful
We were trying to run the summarization notebook and got this error.
Can you advise?
When I run the semantic search notebook
http://localhost:8888/notebooks/Basic_Semantic_Search.ipynb
then I receive the following Info
OMP: Info #276: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead.
Does this depend on my Python3 installation or does this depend on the Cohere code?
trying multi-step tool use notebook, it seems multi-step tool use depends on LangChain's Agent ability.
want to know how to implement with Cohere's Python SDK or API, not with Langchain.
It would be great to have a jupyter notebook on tokenizer, converting tokens into embeddings, among some other common usecases like multi-class classification (multiple classifications per one input sequence like assigning if a word is verb, etc...).
https://docs.cohere.ai/bpe-tokens-wiki
https://docs.cohere.ai/tokenize-reference
Thanks
I think it would be good to have some minimal instructions in the README to explain how to run the notebooks, e.g.
i sign in to https://app.cohere.io/
free trail and I tried to use the API given in the dashboard but it doesn't work in any of the notebook
it give me the CohereError: invalid api token
so how I suppose to get an API in order to test or apply the code
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.